title: Flyout menu in UWP with MVVM
body: <p>I'm trying to implement a Flyout menu in a Windows 10 App (using MVVM) that opens when holding down an item of a GridView. I've been looking and I haven't been able to find any examples that works for me. The Flyout menu is not opening to display options. Does anyone know how can I do it?</p>
  
  <pre><code>&lt;GridView.ItemTemplate&gt;
      &lt;DataTemplate&gt;
          &lt;StackPanel Orientation="Horizontal"&gt;
              &lt;FlyoutBase.AttachedFlyout&gt;
                      &lt;MenuFlyout&gt;
                          &lt;MenuFlyoutItem Text="Delete" Command="{Binding DeleteCommand}"/&gt;
                      &lt;/MenuFlyout&gt;
              &lt;/FlyoutBase.AttachedFlyout&gt;
              &lt;Image Source="{Binding Dictionary}" Height="25"/&gt;
              &lt;TextBlock Text="{Binding Title}" Foreground="White" Width="170"/&gt;
          &lt;/StackPanel&gt;
      &lt;/DataTemplate&gt;
  &lt;/GridView.ItemTemplate&gt;
  </code></pre>
  
  <p><strong>Note:</strong> Solution found in <a href="https://marcominerva.wordpress.com/2013/12/17/using-a-behavior-to-open-attached-flyouts-in-winows-81-store-apps/" rel="nofollow">https://marcominerva.wordpress.com/2013/12/17/using-a-behavior-to-open-attached-flyouts-in-winows-81-store-apps/</a></p>