Icon Property

MenuItem.Icon Property


Gets or sets the icon that appears in a MenuItem.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public object Icon { get; set; }

Property Value

Type: System.Object

The icon that appears in a MenuItem. The default value is null.

Many Menu controls have more than just text in the MenuItem elements. Often there are icons, check marks, accelerators, and arrows to indicate submenus.

Identifier field


Metadata properties set to true


Legacy Code Example

The following example creates a menu item with an icon.

Code snippet is not found. Confirm that the code snippet name 'MenuItems_snip' is correct.

.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft