Hi,
I have created DataGridTemplateColumn dynamically with a dock panel containing TextBlock left aligned and Image right aligned.
Now I need to show ContextMenu in cell right click. I did that. But contextMenu is displayed only if I click on either text or Image. If I Click on the empty middle space its not getting displayed. Below is the code I wrote to set ContextMenu for Dock Panel.
My code:
l_column.CellTemplate.VisualTree.SetValue(ContextMenu.ContextMenuProperty, l_ContextMenu);
Can someone suggest me what can be done to solve this issue.
Thanks in advance.
Regards,
Mohana.