How to change the style of the MahApps.Metro dialog?

I would like to change the style of the message dialog. I used this: How to change the width of a MahApps.Metro dialog box template?

I need different styles for some dialogs. How to change the style of one dialogue? I tried to do this using a property CustomResourceDictionary. But this has no effect.

var Style = (Style) Application.Current.Resources["NewCustomDialogStyle"];
var mySettings = new MetroDialogSettings()
    {
        CustomResourceDictionary = Style.Resources
    };

When I override the MessageDialog style, everything is fine

<Style TargetType="{x:Type Dialog:MessageDialog}" BasedOn="{StaticResource NewCustomDialogStyle}" />
+4
source share

Source: https://habr.com/ru/post/1627550/


All Articles