Override Standard Theme in App.xaml

后端 未结 2 2106
难免孤独
难免孤独 2021-02-15 22:11

I am using the standard WPF theme Aero.NormalColor.xaml. And it works very well. However for the whole application, I would like to override the Foreground colo

2条回答
  •  滥情空心
    2021-02-15 22:25

    I had the same problem and tried Oskar's approach. Though, it caused some strange behaviour. Particularly, the styles did not apply to some controls, while applying to other controls of the same type. And I could not find any major differences between these controls.

    I continued searching for the solution and I found one here: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/91718816-8674-4ad8-a3c8-ae283bebe224/

    It is still not perfect and clear, but it works, at least for me.

    In brief, you can get the idea from the following code: