Overriding ContextMenu default behavior

Ribbon for WPF Forum

Posted 13 years ago by Balaram Barange
Version: 11.1.0540

Following default behavior is seen on ContextMenu:
1) We have a contextmenu which is more than half the size of screen.
2) When we launch it on an item which is vertically at center of the screen, the contextmenu starts from that point and because the contextmenu is not able to fit in the space provided it shows us an expander button.

What we would like here is that in the case when default expander shows up, our context menu shifts that much upward/downward that there would be no need to get the default expander button.

Basically, we would like that the default expander is never shown, as we are writing some automation scripts and we then have to write code to check for presence of expander, and clicking it to get to menu items which got clipped off.

Please suggest on how to achieve this.

Thanks and Regards,

Comments (1)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Bala,

We use the native ContextMenu as a base class for our ribbon:ContextMenu and unfortunately that sort of logic is in the WPF framework code that shows context menus. If you use a native ContextMenu you can see the same thing occur. I'm not sure how it can be altered but that question might be more for Microsoft forums since it happens with native ContextMenus.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.