当通过右键单击树视图上的项目弹出我的上下文菜单时,将取消选择所选行,但我希望选择保持不变。我该怎么做?
<TreeView Name="ProgramTree" ItemsSource="{Binding ProgramItemCollection}">
<TreeView.ContextMenu>
<ContextMenu StaysOpen="True">
<MenuItem Header="Open"/>
<MenuItem Header="Check Syntax"/>
</ContextMenu>
</TreeView.ContextMenu>
...