This documentation is archived and is not being maintained.

MenuBase Class

Represents a control that defines choices for users to select.

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

<StyleTypedPropertyAttribute(Property := "ItemContainerStyle", StyleTargetType := GetType(MenuItem))> _
<LocalizabilityAttribute(LocalizationCategory.Menu)> _
Public MustInherit Class MenuBase _
	Inherits ItemsControl
Dim instance As MenuBase
This class is abstract; see Inheritance Hierarchy for derived non-abstract classes usable in XAML.

The MenuBase is the base class for controls that define choices for users to select. The Menu and ContextMenu inherit from MenuBase and allow the user to select an item to invoke some action.

Content Model: MenuBase is an ItemsControl. Its content properties are Items and ItemsSource. For more information on the content model for MenuBase, see Controls Content Model Overview.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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.

.NET Framework

Supported in: 3.5, 3.0