title: How to use Flyout in the WPF?
body: <p>In my WPF program I use library <a href="http://mahapps.com/" rel="nofollow noreferrer">MahApps.Metro</a>. There is a button, after pressing which I want to display <a href="http://mahapps.com/controls/flyouts.html" rel="nofollow noreferrer">Flyout</a> control.</p>
  
  <p><a href="https://i.stack.imgur.com/Prd5v.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Prd5v.jpg" alt="enter image description here"></a></p>
  
  <pre><code>&lt;Button Height="40" Width="40" HorizontalAlignment="Right" Margin="0,5,5,0" 
          VerticalAlignment="Top" Style="{DynamicResource MetroCircleButtonStyle}" 
          BorderThickness="1"
          Grid.Column="1" Grid.RowSpan="2"&gt;
  
      &lt;controls:FlyoutsControl&gt;
          &lt;controls:FlyoutsControl&gt;
              &lt;controls:Flyout x:Name="yourMahAppFlyout" Header="Flyout" Position="Right" Width="200"&gt;
                  &lt;TextBlock Text="Some text" /&gt;
              &lt;/controls:Flyout&gt;
          &lt;/controls:FlyoutsControl&gt;
      &lt;/controls:FlyoutsControl&gt;
  &lt;/Button&gt;
  </code></pre>
  
  <p>But nothing happening when I press the button. Can't understand, why?</p>
  
  <p><strong>Edit 1:</strong></p>
  
  <p><strong>XAML:</strong></p>
  
  <pre><code>&lt;Button x:Name="circleButtonSettings" Height="40" Width="40" HorizontalAlignment="Right" Margin="0,5,5,0" 
          VerticalAlignment="Top" Style="{DynamicResource MetroCircleButtonStyle}" 
          BorderThickness="1"
          Grid.Column="1" Grid.RowSpan="2" Click="circleButtonSettings_Click"&gt;
  
      &lt;controls:FlyoutsControl&gt;
          &lt;controls:Flyout x:Name="yourMahAppFlyout" Header="Flyout" 
                  Position="Right" Width="200"
                  IsOpen="{Binding OpenFlyOut, Mode=TwoWay}"&gt;
              &lt;TextBlock Text="Some text " /&gt;
          &lt;/controls:Flyout&gt;
      &lt;/controls:FlyoutsControl&gt;
  &lt;/Button&gt;
  </code></pre>
  
  <p><strong>C#:</strong></p>
  
  <pre><code>public struct OpenCloseFlyOut
  {
      public OpenCloseFlyOut(bool _isFlyoutOpen)
      {
          IsFlyoutOpen = _isFlyoutOpen;
      }
  
      public bool IsFlyoutOpen { get; set; }
  }
  
  public partial class MainWindow : MetroWindow
  {
      OpenCloseFlyOut obj = new OpenCloseFlyOut(true);
  
      // I call this method when press the button
      private void ChangeFlyoutState()
      {
          obj.IsFlyoutOpen = !obj.IsFlyoutOpen;
      }
  }
  </code></pre>
  
  <p>After all it is still doesn't work..</p>