We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Strange behavior of customized menu item of Document Tab Item

Thread ID:

Created:

Updated:

Platform:

Replies:

124092 May 16,2016 05:34 AM May 25,2016 08:38 AM WPF 3
loading
Tags: DockingManager
Nick Tang
Asked On May 16, 2016 05:34 AM

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.

Thanks

Attachment: StrangeContextMenuItem_945f9ca5.zip

Vijayalakshmi Roopkumar [Syncfusion]
Replied On May 17, 2016 07:08 AM

Hi Nick,

Thank you for using Syncfusion products.

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:

Sample:StrangeContextMenuItem_Modified

Regards,
Vijayalakshmi V.R.

Nick Tang
Replied On May 24, 2016 04:32 AM

Thanks for your reply.

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.

Vijayalakshmi Roopkumar [Syncfusion]
Replied On May 25, 2016 08:38 AM

Hi Nick,

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

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents 

Regards,
Vijayalakshmi V.R. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;