How to change MahApps.Metro dialog content using styles (remix)

只愿长相守 提交于 2019-12-02 07:00:28
trueCamelType

It turns out I was trying to do this correctly, but I was running into a problem explained here (The answer by Wouter).

It turns out I had to specify the assembly, so

    xmlns:Dialogs="clr-namespace:MahApps.Metro.Controls.Dialogs"

Should be

    xmlns:Dialogs="clr-namespace:MahApps.Metro.Controls.Dialogs;assembly=MahApps.Metro"              

That cleared up my errors in the Style.

So in the end, what I had to set the style was:

<Control.Resources>
    <Style TargetType="{x:Type Dialogs:BaseMetroDialog}">

    </Style>

</Control.Resources>

with

    xmlns:Dialogs="clr-namespace:MahApps.Metro.Controls.Dialogs;assembly=MahApps.Metro"              

at the top.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!