I am creating a WPF application, and I got a bunch of controls from the standard WPF control types - text blocks, buttons, etc. I tried adding a resource dictionary to app.xaml to install the theme, but my user interface controls do not seem to respect it. (For example, the standard buttons are great for the Aero theme, but the myButton obtained from the Button still doesn't work.) Is there a way I can set the theme for my derived controls to the same as for the basic controls?
EDIT: I should note that these custom controls are created at runtime, so I cannot directly control their properties through XAML. I can change certain properties, such as the background color, using Setter in the application resource dictionary, but have not found a way to set the theme using this technique.
source share