[英]Mahapps.Metro : The attachable property WindowCommands was not found in type MetroWindow
[英]mahapps:The attachable property 'Flyouts' was not found in type 'MetroWindow'
我在WPF中非常新。 我想在Windows8中有一个弹出窗口,例如应用程序(右侧)窗口。 使用nuget将mahapps( http://mahapps.com )添加到我的项目中,并向应用程序添加资源,但是当向窗口添加弹出窗口时,出现此错误:
The attachable property 'Flyouts' was not found in type 'MetroWindow'
我的XAML程式码是:
<controls:MetroWindow x:Class="WpfApplication3.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
Title="MainWindow"
Height="600"
Width="800" WindowState="Maximized">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Controls:MetroWindow.Flyouts>
<Controls:FlyoutsControl>
<Controls:Flyout Header="Flyout" Position="Right" Width="200">
</Controls:Flyout>
</Controls:FlyoutsControl>
</Controls:MetroWindow.Flyouts>
<!-- some content -->
在cs文件中没有任何特殊的东西。 我该如何解决这个错误?
尝试删除“ MetroWindow.Flyout” ...
<controls:FlyoutsControl>
<controls:Flyout Position="Bottom">
// .. some controls ..
</controls:Flyout>
</controls:FlyoutsControl>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.