如何更改MahApps.Metro对话框样式?

5
我想改变消息对话框的样式。我使用了这个:如何更改MahApps.Metro对话框内容模板的宽度? 我希望能为一些对话框设置不同的样式。我该如何更改单个对话框的样式?我尝试使用CustomResourceDictionary属性来实现,但没有效果。
var Style = (Style) Application.Current.Resources["NewCustomDialogStyle"];
var mySettings = new MetroDialogSettings()
    {
        CustomResourceDictionary = Style.Resources
    };

当我覆盖 MessageDialog 样式时,一切正常。
<Style TargetType="{x:Type Dialog:MessageDialog}" BasedOn="{StaticResource NewCustomDialogStyle}" />
1个回答

0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接