Note that there are some explanatory texts on larger screens.

plurals
  1. POWPF Context menu disappears when Key.App is released
    primarykey
    data
    text
    <p>I got a problem with context menu when i open through <strong>"Appkey"</strong> please refer <a href="https://stackoverflow.com/questions/4333032/context-menu-disappears-when-opened-with-key-app">this link for same issue</a> for reference. Here i did't handle the event through <strong>keyUp or Keydown</strong>, but through XAML Commandbinding and Inputbinding i'm opening the context menu in codebehind, my problem is how to make context menu remain open even when the key is released.</p> <pre><code> &lt;UserControl.CommandBindings&gt; &lt;!--Custom Commands--&gt; &lt;CommandBinding Command="my:ThumbnailImages.CustomCommandContextMenu" Executed="OpenContextMenu_Executed" /&gt; &lt;/UserControl.CommandBindings&gt; &lt;UserControl.InputBindings&gt; &lt;KeyBinding Command="my:ThumbnailImages.CustomCommandContextMenu" Key="Apps"/&gt; &lt;/UserControl.InputBindings&gt; &lt;ListBox.ContextMenu&gt; &lt;ContextMenu Name="ZoneIformationList" StaysOpen="true" Background="WhiteSmoke"&gt; &lt;ContextMenu.BitmapEffect&gt; &lt;BitmapEffectGroup/&gt; &lt;/ContextMenu.BitmapEffect&gt; &lt;MenuItem Header="Edit" Name="EditNutritionContextMenu" /&gt; &lt;MenuItem Header="Remove" Name="RemoveNutritionContextMenu" /&gt; &lt;/ContextMenu&gt; &lt;/ListBox.ContextMenu&gt; Private Sub OpenContextMenu_Executed(ByVal sender As System.Object, ByVal e As System.Windows.Input.ExecutedRoutedEventArgs) If IsNothing(MyList.ContextMenu) = False Then MyList.ContextMenu.PlacementTarget = MyList MyList.ContextMenu.IsEnabled = True MyList.ContextMenu.IsOpen = True e.Handled = True End If End Sub End Class </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload