Margin and Shadow in WinForms Context Menu Strip
18 Nov 20181 minute to read
Margin Setting
We can set margin for the WinForms Context Menu Strip 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 WinForms Context Menu Strip control.
this.contextMenuStripEx.ShowCheckMargin = true;
this.contextMenuStripEx.ShowImageMargin = true;Me.contextMenuStripEx.ShowCheckMargin = True
Me.contextMenuStripEx.ShowImageMargin = True
Shadow Setting
The shadow option for WinForms Context Menu Strip 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 WinForms Context Menu Strip control.
this.contextMenuStripEx1.DropShadowEnabled = true;Me.contextMenuStripEx1.DropShadowEnabled = True