Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

MenuBase Class

Represents a control that defines choices for users to select.

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

[StyleTypedPropertyAttribute(Property = L"ItemContainerStyle", StyleTargetType = typeof(MenuItem))]
[LocalizabilityAttribute(LocalizationCategory::Menu)]
public ref class MenuBase abstract : public ItemsControl
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.

System::Object
  System.Windows.Threading::DispatcherObject
    System.Windows::DependencyObject
      System.Windows.Media::Visual
        System.Windows::UIElement
          System.Windows::FrameworkElement
            System.Windows.Controls::Control
              System.Windows.Controls::ItemsControl
                System.Windows.Controls.Primitives::MenuBase
                  System.Windows.Controls::ContextMenu
                  System.Windows.Controls::Menu

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

Community Additions

ADD
Show:
© 2015 Microsoft