Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
is the base class for ContextMenuStrip, providing necessary painting and layout properties and methods. The properties of this class that you are most likely to use directly are the ShowCheckMargin and ShowImageMargin properties, which determine whether the shortcut menu will be able to display a check mark, an image, or both.
The following code example demonstrates how to create and initialize a ContextMenuStrip control by setting the check and image margins.
This code is not a complete sample so it will not compile. For a full code listing, see. For a full code listing, see How to: Enable Check Margins and Image Margins in ContextMenuStrip Controls.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.