Overriding Windows 8 application theme for a specific UserControl
I'm developing a Windows Store app using the "Dark" theme, which works fine for the main body of the app. However, for the settings flyout, I want to match the appearance of the system-provided "Permissions" flyout, which is to say, black on white.
Unfortunately, that's rather hard to set for every control with the Dark theme in operation.
Is there a way to use the "Light" theme, overriding the application default, for the UserControl I'm using for my settings pane, or is the only way to to do this to copy all the relevant chunks of the theme file for it into the resources of the UserControl?
I had this exact same problem - using the dark theme, and also using a light background for the settings flyout. The research that I did didn't turn up anything either. I ended up having to style my controls so that they would appear properly on the light settings flyout.
One other thought that I had was this, although I didn't go down this path - to use the light theme as the default, but change my app styling so that the main elements would appear dark. This would mean that the flyout controls would not have to be restyled. I guess it depends on how many controls you are using, and which path is easier.
If you go down the 2nd path, your app obviously loses the ability to change themes on the fly.
链接地址: http://www.djcxy.com/p/11660.html