[英]Why is MahApps unable to find Controls.AnimatedTabControl.xaml?
我想在我的 WPF 项目中使用Controls.AnimatedTabControl.xaml
。
我添加了这一行:
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedTabControl.xaml" />
就像它写在文档中一样。
我的 app.xaml 现在是:
<Application x:Class="myAPP.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Light.Blue.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="Controls.TabControl.xaml"/>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedTabControl.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
VS 告诉我在寻找字典资源时遇到了错误:
pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedTabControl.xaml
知道为什么吗?
选项卡控件的文档不是最新的。 在版本 2.0.0中,所有选项卡控件 styles 都已移至Controls.TabControl.xaml
资源字典,该字典已包含在Controls.xaml
中。
请参阅 GitHub 上的相关更改: (GH-3587) All TabControl styles 在一个资源字典中
为了使用不同的 styles,您必须将TabControl
替换为MahApps等效项。
<mah:MetroAnimatedTabControl>
<mah:MetroAnimatedSingleRowTabControl>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.