user4002899
user4002899

Reputation: 85

mahapps:The attachable property 'Flyouts' was not found in type 'MetroWindow'

i m very new in wpf. i want to have a flyout window like application (right side) window in windows8. use nuget to add mahapps(http://mahapps.com) to my project and add resources to application but when add a flyout to window i get this error:

    The attachable property 'Flyouts' was not found in type 'MetroWindow'

my xaml code is:

    <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 -->

in cs file there is not any special thing. how could i fix this error?

Upvotes: 0

Views: 2734

Answers (1)

aggietech
aggietech

Reputation: 978

Try removing the "MetroWindow.Flyout" ...

<controls:FlyoutsControl>
            <controls:Flyout Position="Bottom">
                      //  .. some controls .. 
             </controls:Flyout>
</controls:FlyoutsControl>

Upvotes: 2

Related Questions