I'd like to change the visual of the XamDataGrid when there is a context menu popped up from a cell. Is there a way for the data grid to detect if one of its cells pop ups a menu?
Thanks!
Hello Jack,
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.
Thank you for your post. I have been looking into it and I can suggest you create a Style for the CellValuePresenter and add an EventSetter for its ContextMenuOpening event like this:
<Style TargetType="{x:Type igDP:CellValuePresenter}"> <EventSetter Event="ContextMenuOpening" Handler="CellValuePresenter_ContextMenuOpening"/> </Style>
The handler may look like this:
private void CellValuePresenter_ContextMenuOpening(object sender, ContextMenuEventArgs e) { }
and the sender will be the CellValuePresenter that the user right-clicked on. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.