How to disable WPF ContextMenu animations?

前端 未结 3 1041
伪装坚强ぢ
伪装坚强ぢ 2020-12-15 22:57

I\'m trying to hunt down what bit I need to tweak to get ContextMenus in WPF to stop animating when they appear/disappear.

From what I can tell, WPF creates a Popup

3条回答
  •  不知归路
    2020-12-15 23:46

    I've been struggling with this too. I've found that the solution is to "override" the system parameter that control popup animation.

    Do this by defining a resource (perhaps in your Themes\Generic.xaml) like this:

    None
    

提交回复
热议问题