0

How I do define and apply themes to my custom control that is hosted in an ElementHost.

VS created Generic.xaml in the Themes folder. If I renamed it to something else (like Blue.xaml), the entire control does not show up.

Another question is what theme xaml files should be set to in VS: Content, Page or Resource?

Metro
  • 1,121
  • 1
  • 13
  • 33

1 Answers1

0

You should always have a Generic.xaml defined.

Copy it, and then change your Blue.xaml to define your "Blue" theme.

Build Action = Page

See as you're hosting your WPF control in a Windows Forms Application with ElementHost, then you might have difficulty in it seeing changes to the theme.

See:

Community
  • 1
  • 1
Colin Smith
  • 12,375
  • 4
  • 39
  • 47