c# - Restrict/Move the context-menu (right click) in window bounds -
Whenever you click on the side of the browser (or any other application), the context menu will overflow the window, but No screen
I always want to lie in the context of the context menu, so when I click near the bottom edge, this menu should be shown at the top. Suppose the window dimensions will always be larger than the context menu.
Is this possible? If not, then what is the solution?
P.S. I'm not building application windows, just a viewer for applications
Use more properties of your context menu
In this example below, I want the placement property to be " And setting the rectangle for "rectangle", y coordinate 25, 25. Again, no matter that I'm on the context menu 25, 25, relative to the button.
& lt; Insert Button Menu Service. Placement = "Relative" context menu service. Placement rectangle = "25, 25, 0, 0" & gt; & Lt; Button.ContextMenu & gt; & Lt; ContextMenu & gt; & Lt; MenuItem Header = "Do It" /> & Lt; MenuItem Header = "Do It" /> & Lt; / ContextMenu & gt; & Lt; /Button.ContextMenu> & Lt; / Button & gt; You can, of course, use what values for these properties, depending on the size of the menu and its proximity to the edge, can calculate some more dynamic.
Comments
Post a Comment