WPF MenuItem style parameters not available on menu first open

后端 未结 1 372
青春惊慌失措
青春惊慌失措 2020-12-22 12:20

I am specifying a context menu within the ControlTemplate of a TreeViewItem as follows:

                                    

        
相关标签:
1条回答
  • 2020-12-22 12:42

    Try swaping CommandParameter and Command property setters. I'm not sure about the reason of such behavior, but is looks like it doesn't requery can execute on CommandParameter changed. Another way is of fixing is described here https://web.archive.org/web/20140528012720/http://compositewpf.codeplex.com/discussions/47338

    Github issue tracking this exact issue here: https://github.com/dotnet/wpf/issues/3452

    0 讨论(0)
提交回复
热议问题