Hi, i made one project with type window app, so it has app.xml
i put application resource dictionary in it
App.XML in Project 1 with button style FontWeight Bold and Foreground Red
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Styles\ButtonStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
then i build it, and make another window app project, i copied the style and has same Resource dictionary
Project 2 has Reference Project 1
App.XML in Project 2 With FontWeight Normal and Foreground Black
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Styles\ButtonStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
Said that i have a button1 in Project 1, when in visual studio it display correctly to have Font Bold and Color Red.
in Project 2 i call the button1 in project 1, but it display Font Normal and Color Black. so the button1 use the style in project 2.
as my button1 in user control, so i move the resource definition in usercontrol.Resource, it display correctly even if i call the button1 from project 2.
but, it will be very complicated if i have many button with separate usercontrol to define the styles each user control.
so how i can make my resource defined for entire project 1, without being overwritten by project 2?
Thanks for advance.