Add MenuItems to existing ContextMenu within a Style in XAML
I have a style for a control and I'd like to add items to the context menu of that control. I was able to replace the context menu with my own but have found no way to add it开发者_C百科ems to the existing one. Is this possible in XAML?
Thanks!
You can always toggle a MenuItem's visibility in XAML using bindings. This allows you to create one context menu but control the options displayed to the user entirely through XAML. This is what I've done in the past as it seems to be the easiest option.
精彩评论