Files
docs-desktop/dotnet-desktop-guide/framework/winforms/controls/how-to-configure-menustrip-check-margins-and-image-margins.md
T
Andy De George c0ba284473 Initial winforms content migrated (#18)
* Merge winforms framework content to working branch (#14)

* Breadcrumb / TOC / Move net5 to net folder (#15)

* change path from net5 to net

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Add .net 5 winforms placeholder article (#16)

* added some metadata and adjusted net5 placeholder

* corrections

* corrections

* corrections

* Test1

* Swapping landing page vs concept

* fix links

* Fix links

* Fix desc
2020-09-01 16:26:21 -07:00

1.8 KiB

title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
title ms.date dev_langs helpviewer_keywords ms.assetid
How to: Configure MenuStrip Check Margins and Image Margins 03/30/2017
csharp
vb
margins [Windows Forms], setting in MenuStrip controls
menus [Windows Forms], setting margins
MenuStrip control [Windows Forms], configuring check and image margins
45a9075d-4bea-4ce2-9b2c-7619aa39f8ce

How to: Configure MenuStrip Check Margins and Image Margins

You can customize a xref:System.Windows.Forms.MenuStrip by setting the xref:System.Windows.Forms.ToolStripDropDownMenu.ShowImageMargin%2A and xref:System.Windows.Forms.ToolStripDropDownMenu.ShowCheckMargin%2A properties in various combinations.

Example

The following code example demonstrates how to set and customize the xref:System.Windows.Forms.ContextMenuStrip check margins and image margins. The procedure is the same for a xref:System.Windows.Forms.ContextMenuStrip or a xref:System.Windows.Forms.MenuStrip.

[!code-csharpSystem.Windows.Forms.ToolStrip.Misc#60] [!code-vbSystem.Windows.Forms.ToolStrip.Misc#60]

Compiling the Code

This example requires:

  • References to the System, System.Drawing and System.Windows.Forms assemblies.

See also