Hi,
I have placed text boxes and a XamDataGrid on a XamDialogWindow. I have set IsModal property of the XamDialogWindow to true and I have added ContextMenu On DataRecordPresenter of the grid.When I reight click on the grid, the contextMenu opens for a very brief time (few miliseconds) and then disappears. If the IsModal property is set to false, then it works just fine. I'm attaching a sample project. In this project my styling for XamDataGrid is done in XamDataGridStyle.xaml file. In ModalWindow if we put grid in scrollviewer. The scrollviewer contextmenu shows same behavior as well. A snapshot of snoop events for contextmenuopening and contextmenuclosing is also attached. Your help will be appreciated.
Hello Gottfried,
Thank you for your post.
I have been investigating into this issue and I have reproduced the behavior that you are seeing. Strangely, this appears to only happen with certain controls, such as the XamDataGrid. Placing a context menu on a Button element or something of the like seems to work correctly whether or not the dialog is modal. I am not entirely sure as of yet why the ContextMenu is closing instantly after being opened, but I am still investigating into this issue. I believe that the issue is likely happening because the ContextMenu itself is essentially a popup, and modal dialogs are meant to keep focus on themselves, so perhaps that is why the ContextMenu is not being opened.
Something that is a bit strange is that the Infragistics context menu, the XamContextMenu, seems to work in this case. For the time being, I would recommend that you use the XamContextMenu instead of the built-in WPF one. You can read more about the XamContextMenu in our online documentation article about it, here: http://help.infragistics.com/doc/WPF/2016.1/CLR4.0/?page=xamContextMenu.html.
I have also attached a sample project demonstrating the usage of a XamContextMenu on the DataRecordPresenter of a XamDataGrid. I hope this helps.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
Problem i am facing is with filter area of xamdatagrid inside XamDialogWindow.
context menu opens and close suddenly.
can you please help me with this.
Hi Andrew,
We are implementing your solution but is it going to be fixed in the service release? or we have to work with it?