Margin and Shadow in Windows Forms ContextMenuStrip (ContextMenuStripEx)
9 Dec 2019 / 1 minute to read
Margin Setting
We can set margin for the context menu to indicates whether a check mark should appear before the text of the menu item by using the ShowCheckMargin
property. Also to show image separately, use the ShowImageMargin
property.
The below code snippet will explain how to set the margin for ContextMenuStripEx control.
this.contextMenuStripEx.ShowCheckMargin = true;
this.contextMenuStripEx.ShowImageMargin = true;
Me.contextMenuStripEx.ShowCheckMargin = True
Me.contextMenuStripEx.ShowImageMargin = True
Shadow Setting
The shadow option for ContextMenuStripEx control refers to shows a three dimensional shadow for the context menu. It can be enabled by using the DropShadowEnabled
property.
The below code snippet will explain how to set shadow for ContextMenuStripEx control.
this.contextMenuStripEx1.DropShadowEnabled = true;
Me.contextMenuStripEx1.DropShadowEnabled = True
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page