I need to create a context menu when a header is right clicked. I would also like to have the contect menu only when headers for specific columns are clicked. Need to at least know the header text so I can use that for the action.
Hello,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Thank you so much for your help
I have modified the sample I sent you before, so now it works as you want. I used command for the MenuItem. Also the same ContextMenu is applied to two of the Fields.
Hope this helps you.
I am running MVVM environment, so, although this works, it would be better if I can use a command. Also, would like to only have a single definition that could apply to multiple column headers, and still be able to differentiate which one was clicked.
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I created a Style for the LabelPresenter and set its ContextMenu. Also I set the Style only to “name” Field. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.