Reputation: 7030
When my contextmenu is popped up by right clicking on an item on the treeview, the selected row gets deselected but I want the selection to persist. How do I do this?
<TreeView Name="ProgramTree" ItemsSource="{Binding ProgramItemCollection}">
<TreeView.ContextMenu>
<ContextMenu StaysOpen="True">
<MenuItem Header="Open"/>
<MenuItem Header="Check Syntax"/>
</ContextMenu>
</TreeView.ContextMenu>
...
Upvotes: 0
Views: 380