简体   繁体   English

WPF MDI添加Mahapps都市风格

[英]WPF MDI add Mahapps metro style

I want to use Mahapps style on WPF.MDI . 我想用Mahapps风格上WPF.MDI
I managed to add the style to UserControl, with resource merging, but child is unchanged. 我设法通过资源合并将样式添加到UserControl中,但是child保持不变。

Need to create new them for WPF.MDI, that targets mahapps style? 是否需要针对Wap.MDI创建新的目标,以针对狂人风格?

Any direction helps. 任何方向都有帮助。

I figure it out, on my own. 我自己弄清楚。
Short explanation here: 简短说明:
Created a copy of Aero.xaml, modified it and referenced Mahapps . 创建了Aero.xaml的副本,对其进行了修改并引用了Mahapps
Source on GitHub . 来源GitHub

在此处输入图片说明

I reconfigured to use resource dictionary and fixed window control highlight (close, minimize, maximize). 我重新配置为使用资源字典和固定的窗口控件突出显示(关闭,最小化,最大化)。


在此处输入图片说明

Nice work! 干得好!

To use the Accent defined in the application resources, I deleted accent defined in Metro.xaml. 要使用应用程序资源中定义的口音,我删除了Metro.xaml中定义的口音。 The remaining problem is the Accent of Inactive Window. 剩下的问题是非活动窗口的重音。

"WPF.MDI\\Themes\\Metro.xaml", commented out line 10-12: “ WPF.MDI \\ Themes \\ Metro.xaml”,注释了第10-12行:

<!-- Deleted to use Accent defined in App.xaml -->
<!--
<Color x:Key="AccentColor">#CC161717</Color>
<Color x:Key="AccentBaseColor">#CC161717</Color>
<Color x:Key="AccentColor2">#868686</Color>
-->

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM