This project is read-only.

Choosing a different theme for a ModernDialog

Nov 19, 2013 at 12:52 PM
The theme for an application I'm working for contains a logo in its background, in the same fashion as the "Hello Kitty" example of the Sample application.

Now I want to display a ModernDialog, but the logo makes it difficult to read the text in the dialog.

Is there a way to select a different theme for a specific Window? The problem can actually also be seen in the demo app, the "Hello Kitty" being cut when we display a message box. It would make much more sense if, in the case of Message box the "Hello Kitty" logo wouldn't be displayed.
Sep 19, 2014 at 2:12 PM
I have custom theme and dark banner on top + white navigation items.
I would also like to know how to remove custom theme from ModernDialog.
I agree with Gimly.
Sep 19, 2014 at 3:54 PM
You can easily remove the background content, by creating a custom implicit ModernDialog style that derives from the default ModernDialog style. In your custom style set the BackgroundContent property to null like so:
<Style TargetType="mui:ModernDialog" BasedOn="{StaticResource {x:Type mui:ModernDialog}}">
  <Setter Property="BackgroundContent" Value="{x:Null}" />
For some additional information on deriving from implicit and default MUI styles, see this tutorial.
Sep 23, 2014 at 8:35 PM
It works greatly! Thanks about tutorial.