Mar 16, 2011 at 4:45 PM
Edited Mar 16, 2011 at 4:46 PM
First off I would like to say that I really like the control you have created. It makes using Context Menus so much easier that the standard ToolKit version.
I had a question/suggestion. I am looking to cancel the opening of the context menu when the user clicks on the Header of the datagrid but display the menu when they click on a DataGridRow. I couldn't find any properties that would allow this. So I have
temporaily added one called IsOpeningCancelled. I check this value in the Open method of the PopupMenuBase and if it is set to true then exit out. It seems to work, though not knowing the details of your code I am not sure if it would cause other problems.
If you could let me know if there is already a process to do this that I have missed or if you see any issue with what I have done please let me know.
Thank you again for all you work on this control!
Example of the change:
OverlayCanvas.Opacity = 0; // Make sure the root grid is hidden before repositioning
IsOpening = true;
if (Opening != null)
IsOpening = false;
IsOpeningCancelled = false;