Strange behavior of customized menu item of Document Tab Item

Thread ID:

Created:

Updated:

Platform:

Replies:

I add two customized menu items into context menu of document tab, when I right click the tab header, the added menu items could display correctly, but when I right click the work area of the document ( not the document header ), only the new two menu items displayed in the context menu, it's strange, the context menu shouldn't display when I click other place. I don't want to write extra code to handle it, to let the customized menu item invisible when I click other place not the document header. Is there any easy way to do that? Or it's a defect of DockingManager?

I upload a sample, compile and run it, let the Mail be tabbled, then right click it, you will reproduce it as my description.

Query #1:The added menu items could display correctly, but when I right click the work area of the document ( not the document header ), only the new two menu items displayed in the context menu, it's strange.

The behavior of our DockingManager control is displaying both the default and custom context menu items on right clicking document tab header. On right clicking the other part of document tab, only the custom context menu items are displayed. That’s why custom context menu items are displayed when you right click the work area of the document.

Query #2: How to let the customized menu item invisible when I click other place not the document header. Is there any easy way to do that? Or it's a defect of DockingManager?

To prevent the custom context menu items from opening on right click at work area of the document, we suggest you to handle the PreviewMouseRightButtonUp event of each document child element in DockingManager. You can download the sample for the same from the following link:

I used the ealier version (11.4400.0.26) of Syncfusion dll, it worked as I expected, the custom menu items wouldn't display when I right clicked the document work area. After upgrade Syncfusion dll to 14.1450.0.41, I didn't change my source code, I got the unexpected result. I really do not like the new behavior. It doesn't make sense to me. The custom menu items are just for the tab, like Close/Close ALL/Close All But This.

I have a few other context menus when right click the work area of document, hit on different control, pop up different context menu, it is bad to handle the custome context menu when trigger the PreviewMouseRightButtonUp event.

If it is really your new feature, I don't like it. It would be good if there is an option to control its behavior. At right now, I have to fix it in my project. Thanks.

We were able to reproduce the issue and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates