menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfMenuItem - UWP API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfMenuItem

    Represents the Menu Item Class.

    Inheritance
    System.Object
    HeaderedItemsControl
    SfMenuItem
    Implements
    System.IDisposable
    Inherited Members
    HeaderedItemsControl.Header
    HeaderedItemsControl.HeaderProperty
    HeaderedItemsControl.HeaderStyle
    HeaderedItemsControl.HeaderStyleProperty
    HeaderedItemsControl.HeaderTemplate
    HeaderedItemsControl.HeaderTemplateProperty
    HeaderedItemsControl.HeaderTemplateSelector
    HeaderedItemsControl.HeaderTemplateSelectorProperty
    HeaderedItemsControl.PrepareHeaderedItemsControlContainer(Object, ItemsControl)
    Namespace: Syncfusion.UI.Xaml.Controls.Navigation
    Assembly: Syncfusion.SfMenu.UWP.dll
    Syntax
    [ClassReference(IsReviewed = false)]
    public class SfMenuItem : HeaderedItemsControl, IDisposable

    Constructors

    SfMenuItem()

    Initializes a new instance of the SfMenuItem class.

    Declaration
    [ClassReference(IsReviewed = false)]
    public SfMenuItem()

    Fields

    BottomScrollButtonStyleProperty

    Represents the style of Bottom Scroll Button present in the subMenu Popup.

    Declaration
    public static readonly DependencyProperty BottomScrollButtonStyleProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    CheckBoxStyleProperty

    Represents the style of Check Box present in the MenuItem Icon.

    Declaration
    public static readonly DependencyProperty CheckBoxStyleProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    CheckBoxVisibilityProperty

    Using a DependencyProperty as the backing store for CheckBox Visibility. It Represents the checkBox placed in MenuItem Icon can be visible or not.

    Declaration
    public static readonly DependencyProperty CheckBoxVisibilityProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    CommandParameterProperty

    Using a DependencyProperty as the backing store for Command Parameter. It Represents the Command Parameter to be passed to execute the command.

    Declaration
    public static readonly DependencyProperty CommandParameterProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    CommandProperty

    Using a DependencyProperty as the backing store for Command. It Represents the Command to be executed.

    Declaration
    public static readonly DependencyProperty CommandProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    ExtendButtonVisibilityProperty

    Represents the ExtendButton is Visible or not

    Declaration
    public static readonly DependencyProperty ExtendButtonVisibilityProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    GroupNameProperty

    Using a DependencyProperty as the backing store for GroupName. It Represents GroupName of the MenuItem to use the Radio Button functionality.

    Declaration
    public static readonly DependencyProperty GroupNameProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    IconProperty

    Using a DependencyProperty as the backing store for Icon of type Object

    Declaration
    public static readonly DependencyProperty IconProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    IconVisibilityProperty

    Using a DependencyProperty as the backing store for Icon Visibility. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty IconVisibilityProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    InputGestureTextProperty

    Using a DependencyProperty as the backing store for InputGestureText. It Represents InputGestureText of the MenuItem to be displayed right to the header.

    Declaration
    public static readonly DependencyProperty InputGestureTextProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    IsCheckableProperty

    Using a DependencyProperty as the backing store for IsCheckable. It Represents the MenuItem can be checkable or not.

    Declaration
    public static readonly DependencyProperty IsCheckableProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    IsCheckedProperty

    Using a DependencyProperty as the backing store for IsChecked. It Represents the MenuItem is Checked or not.

    Declaration
    public static readonly DependencyProperty IsCheckedProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    IsPressedProperty

    Using a DependencyProperty as the backing store for IsPressed. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty IsPressedProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    IsStaysOpenOnClickProperty

    Represents the MenuItem popup to stay open On click

    Declaration
    public static readonly DependencyProperty IsStaysOpenOnClickProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    IsSubMenuOpenProperty

    Represents SubMenu popup is Open or closed

    Declaration
    public static readonly DependencyProperty IsSubMenuOpenProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    MenuExtendvisibilityProperty

    Using a DependencyProperty as the backing store for MenuExtend visibility. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty MenuExtendvisibilityProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    RadioButtonStyleProperty

    Represents the style of Radio Button present in the MenuItem Icon.

    Declaration
    public static readonly DependencyProperty RadioButtonStyleProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    RadioButtonVisibilityProperty

    Using a DependencyProperty as the backing store for Radio Button Visibility. It Represents the Radio Button placed in MenuItem Icon can be visible or not.

    Declaration
    public static readonly DependencyProperty RadioButtonVisibilityProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    RoleProperty

    Using a DependencyProperty as the backing store for Role. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty RoleProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    ScrollerHeightProperty

    Using a DependencyProperty as the backing store for Scrollable Height. It Represents the checkBox placed in MenuItem Icon can be visible or not.

    Declaration
    public static readonly DependencyProperty ScrollerHeightProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    TopScrollButtonStyleProperty

    Represents the style of Top Scroll Button present in the subMenu Popup.

    Declaration
    public static readonly DependencyProperty TopScrollButtonStyleProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    Properties

    BottomScrollButtonStyle

    Gets or sets the bottom scroll button style.

    Declaration
    [ClassReference(IsReviewed = false)]
    public Style BottomScrollButtonStyle { get; set; }
    Property Value
    Type Description
    Windows.UI.Xaml.Style

    The bottom scroll button style.

    CheckBoxStyle

    Gets or sets the check box style.

    Declaration
    [ClassReference(IsReviewed = false)]
    public Style CheckBoxStyle { get; set; }
    Property Value
    Type
    Windows.UI.Xaml.Style

    CheckBoxVisibility

    Gets or sets the check box visibility.

    Declaration
    [ClassReference(IsReviewed = false)]
    public Visibility CheckBoxVisibility { get; set; }
    Property Value
    Type Description
    Windows.UI.Xaml.Visibility

    The check box visibility.

    CheckIconType

    Gets or sets the type of the check icon.

    Declaration
    [ClassReference(IsReviewed = false)]
    public CheckIconType CheckIconType { get; set; }
    Property Value
    Type Description
    CheckIconType

    The type of the check icon.

    Command

    Gets or sets the command.

    Declaration
    [ClassReference(IsReviewed = false)]
    public ICommand Command { get; set; }
    Property Value
    Type Description
    System.Windows.Input.ICommand

    The command.

    CommandParameter

    Gets or sets the command parameter.

    Declaration
    [ClassReference(IsReviewed = false)]
    public object CommandParameter { get; set; }
    Property Value
    Type Description
    System.Object

    The command parameter.

    GroupName

    Gets or sets the name of the group.

    Declaration
    [ClassReference(IsReviewed = false)]
    public string GroupName { get; set; }
    Property Value
    Type Description
    System.String

    The name of the group.

    Icon

    Gets or sets the icon.

    Declaration
    [ClassReference(IsReviewed = false)]
    public object Icon { get; set; }
    Property Value
    Type Description
    System.Object

    The icon.

    InputGestureText

    Gets or sets the Input Gesture Text.

    Declaration
    [ClassReference(IsReviewed = false)]
    public string InputGestureText { get; set; }
    Property Value
    Type Description
    System.String

    The Input Gesture Text.

    IsCheckable

    Gets or sets a value indicating whether this instance is checkable.

    Declaration
    [ClassReference(IsReviewed = false)]
    public bool IsCheckable { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is checkable; otherwise, false.

    IsChecked

    Gets or sets a value indicating whether this instance is checked.

    Declaration
    [ClassReference(IsReviewed = false)]
    public bool IsChecked { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is checked; otherwise, false.

    IsSubMenuOpen

    Gets or sets a value indicating whether this instance is sub menu open.

    Declaration
    [ClassReference(IsReviewed = false)]
    public bool IsSubMenuOpen { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is sub menu open; otherwise, false.

    RadioButtonStyle

    Gets or sets the radio button style.

    Declaration
    [ClassReference(IsReviewed = false)]
    public Style RadioButtonStyle { get; set; }
    Property Value
    Type Description
    Windows.UI.Xaml.Style

    The radio button style.

    RadioButtonVisibility

    Gets or sets the radio button visibility.

    Declaration
    [ClassReference(IsReviewed = false)]
    public Visibility RadioButtonVisibility { get; set; }
    Property Value
    Type Description
    Windows.UI.Xaml.Visibility

    The radio button visibility.

    Role

    Gets the role.

    Declaration
    [ClassReference(IsReviewed = false)]
    public Role Role { get; }
    Property Value
    Type Description
    Role

    The role.

    ScrollerHeight

    Gets or sets the height of the scroll viewer.

    Declaration
    [ClassReference(IsReviewed = false)]
    public double ScrollerHeight { get; set; }
    Property Value
    Type Description
    System.Double

    The height of the scroll viewer.

    StaysOpenOnClick

    Gets or sets a value indicating whether this instance is stays open on click.

    Declaration
    [ClassReference(IsReviewed = false)]
    public bool StaysOpenOnClick { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is stays open on click; otherwise, false.

    TopScrollButtonStyle

    Gets or sets the top scroll button style.

    Declaration
    [ClassReference(IsReviewed = false)]
    public Style TopScrollButtonStyle { get; set; }
    Property Value
    Type Description
    Windows.UI.Xaml.Style

    The top scroll button style.

    Methods

    Dispose()

    Represents dispose method for disposing unwanted objects

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Disposing unused objects

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    Argument to dispose the unused object

    GetContainerForItemOverride()

    Creates or identifies the element that is used to display the given item.

    Declaration
    protected override DependencyObject GetContainerForItemOverride()
    Returns
    Type Description
    Windows.UI.Xaml.DependencyObject

    The element that is used to display the given item.

    IsItemItsOwnContainerOverride(Object)

    Determines if the specified item is (or is eligible to be) its own container.

    Declaration
    protected override bool IsItemItsOwnContainerOverride(object item)
    Parameters
    Type Name Description
    System.Object item

    The item to check.

    Returns
    Type Description
    System.Boolean

    true if the item is (or is eligible to be) its own container; otherwise, false.

    OnApplyTemplate()

    Builds the visual tree for the System.Windows.Controls.HeaderedItemsControl when a new template is applied.

    Declaration
    protected override void OnApplyTemplate()

    OnClosed(RoutedEventArgs)

    Invoked when Menu is closed

    Declaration
    protected virtual void OnClosed(RoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.RoutedEventArgs e

    The event arguments

    OnClosing(RoutedEventArgs)

    Invokes when Menu is closing

    Declaration
    protected virtual void OnClosing(RoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.RoutedEventArgs e

    The event arguments

    OnIsCheckedPropertyChanged(DependencyPropertyChangedEventArgs)

    Invokes when IsChecked property is changed

    Declaration
    protected virtual void OnIsCheckedPropertyChanged(DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    Windows.UI.Xaml.DependencyPropertyChangedEventArgs args

    The event arguments

    OnKeyDown(KeyRoutedEventArgs)

    Called before the System.Windows.UIElement.KeyDown event occurs.

    Declaration
    protected override void OnKeyDown(KeyRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.KeyRoutedEventArgs e

    The data for the event.

    OnLostFocus(RoutedEventArgs)

    Occurs when the control loses focus

    Declaration
    protected override void OnLostFocus(RoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.RoutedEventArgs e

    The event arguments

    OnOpened(RoutedEventArgs)

    Invokes when Menu is opened

    Declaration
    protected virtual void OnOpened(RoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.RoutedEventArgs e

    The event arguments

    OnOpening(RoutedEventArgs)

    Invokes when Menu is opening

    Declaration
    protected virtual void OnOpening(RoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.RoutedEventArgs e

    The event arguments

    OnPanelWidthChanged(DependencyPropertyChangedEventArgs)

    Invoked when panel width is changed

    Declaration
    protected void OnPanelWidthChanged(DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    Windows.UI.Xaml.DependencyPropertyChangedEventArgs args

    The event arguments

    OnPointerEntered(PointerRoutedEventArgs)

    Called before the System.Windows.UIElement.MouseEnter event occurs.

    Declaration
    protected override void OnPointerEntered(PointerRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.PointerRoutedEventArgs e

    The data for the event.

    OnPointerExited(PointerRoutedEventArgs)

    Called before the System.Windows.UIElement.MouseLeave event occurs.

    Declaration
    protected override void OnPointerExited(PointerRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.PointerRoutedEventArgs e

    The data for the event.

    OnPointerPressed(PointerRoutedEventArgs)

    Called before the System.Windows.UIElement.MouseLeftButtonDown event occurs.

    Declaration
    protected override void OnPointerPressed(PointerRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.PointerRoutedEventArgs e

    The data for the event.

    OnPointerReleased(PointerRoutedEventArgs)

    Called before the System.Windows.UIElement.MouseLeftButtonUp event occurs.

    Declaration
    protected override void OnPointerReleased(PointerRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.PointerRoutedEventArgs e

    The data for the event.

    PrepareContainerForItemOverride(DependencyObject, Object)

    Prepares the specified element to display the specified item.

    Declaration
    protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
    Parameters
    Type Name Description
    Windows.UI.Xaml.DependencyObject element

    The container element used to display the specified item.

    System.Object item

    The content to display.

    Events

    Checked

    Occurs when [checked].

    Declaration
    public event RoutedEventHandler Checked
    Event Type
    Type
    Windows.UI.Xaml.RoutedEventHandler

    Click

    Occurs when [click].

    Declaration
    public event RoutedEventHandler Click
    Event Type
    Type
    Windows.UI.Xaml.RoutedEventHandler

    PopUpClosed

    Occurs when [PopUp closed].

    Declaration
    public event RoutedEventHandler PopUpClosed
    Event Type
    Type
    Windows.UI.Xaml.RoutedEventHandler

    PopUpClosing

    Occurs when [PopUp closing].

    Declaration
    public event RoutedEventHandler PopUpClosing
    Event Type
    Type
    Windows.UI.Xaml.RoutedEventHandler

    PopUpOpened

    Occurs when [PopUp opened].

    Declaration
    public event RoutedEventHandler PopUpOpened
    Event Type
    Type
    Windows.UI.Xaml.RoutedEventHandler

    PopUpOpening

    Occurs when [PopUp opening].

    Declaration
    public event RoutedEventHandler PopUpOpening
    Event Type
    Type
    Windows.UI.Xaml.RoutedEventHandler

    UnChecked

    Occurs when [un checked].

    Declaration
    public event RoutedEventHandler UnChecked
    Event Type
    Type
    Windows.UI.Xaml.RoutedEventHandler

    Implements

    System.IDisposable

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved