Styling a UserControl in WPF from another assembly?

Yes you can do it Check this SO post where I show how to do it programmatically. I was doing it with ControlTemplates, but the exact same thing applies to Styles as well To do it declaratively may be simpler, you may have to programmatically merge your resourcedictionaries, declare the right StaticResources and namespaces in your xaml, and then just reference the style/template that you want.

Yes you can do it. Check this SO post where I show how to do it programmatically. I was doing it with ControlTemplates, but the exact same thing applies to Styles as well.To do it declaratively may be simpler, you may have to programmatically merge your resourcedictionaries, declare the right StaticResources and namespaces in your xaml, and then just reference the style/template that you want.

I have a WPF user control defined in an application assembly. I'm trying to style the user control based on styles in another (skin or theme) assembly. I don't want the theme/skin assembly which contains the resourcedictionary with all the styles to reference the application assembly.

Is there any way of doing this? In the MyStyles. In any window that uses MyUserControl.

However, I would prefer to target the custom user control in the MyStyles. Is this possible?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions