# SubMenuItem class

Namespace: [Eto.Forms](https://eto.picoe.ca/api/namespace/eto.forms.md) · Assembly: [Eto](https://eto.picoe.ca/api/assembly/eto.md)

```cs
[ContentProperty("Items")]
[Handler(SubMenuItem.IHandler)]
public class SubMenuItem : ButtonMenuItem, ISubmenu, IBindableWidgetContainer
```

Menu item for a submenu

**Remarks:** This will always show as a submenu, even when no items have been added. The [SubMenuItem.Opening](https://eto.picoe.ca/api/type/eto.forms.submenuitem/opening.md) can be used to populate or modify the submenu before it opens.

## Constructors

- [SubMenuItem](https://eto.picoe.ca/api/type/eto.forms.submenuitem/ctor.md): (3 overloads) Initializes a new instance of the [SubMenuItem](https://eto.picoe.ca/api/type/eto.forms.submenuitem.md) class.

## Fields

- [ClosedEvent](https://eto.picoe.ca/api/type/eto.forms.submenuitem/closedevent.md): (static) Event identifier for handlers when attaching the [SubMenuItem.Closed](https://eto.picoe.ca/api/type/eto.forms.submenuitem/closed.md) event.
- [ClosingEvent](https://eto.picoe.ca/api/type/eto.forms.submenuitem/closingevent.md): (static) Event identifier for handlers when attaching the [SubMenuItem.Closing](https://eto.picoe.ca/api/type/eto.forms.submenuitem/closing.md) event.
- [OpeningEvent](https://eto.picoe.ca/api/type/eto.forms.submenuitem/openingevent.md): (static) Event identifier for handlers when attaching the [SubMenuItem.Opening](https://eto.picoe.ca/api/type/eto.forms.submenuitem/opening.md) event.

## Methods

- [GetCallback](https://eto.picoe.ca/api/type/eto.forms.submenuitem/getcallback.md): Gets an instance of an object used to perform callbacks to the widget from handler implementations
- [OnClosed](https://eto.picoe.ca/api/type/eto.forms.submenuitem/onclosed.md): Raises the [SubMenuItem.Closed](https://eto.picoe.ca/api/type/eto.forms.submenuitem/closed.md) event.
- [OnClosing](https://eto.picoe.ca/api/type/eto.forms.submenuitem/onclosing.md): Raises the [SubMenuItem.Closing](https://eto.picoe.ca/api/type/eto.forms.submenuitem/closing.md) event.
- [OnOpening](https://eto.picoe.ca/api/type/eto.forms.submenuitem/onopening.md): Raises the [SubMenuItem.Opening](https://eto.picoe.ca/api/type/eto.forms.submenuitem/opening.md) event.

## Events

- [Closed](https://eto.picoe.ca/api/type/eto.forms.submenuitem/closed.md): Occurs when the sub menu is closed/dismissed, after the menu item has been selected and its click event is triggered.
- [Closing](https://eto.picoe.ca/api/type/eto.forms.submenuitem/closing.md): Occurs before the sub menu is closed/dismissed when the user clicks an item, but before the menu item's click event is triggered.
- [Opening](https://eto.picoe.ca/api/type/eto.forms.submenuitem/opening.md): Occurs when the sub menu is opening, before it is shown.

## Inherited Members

- From [ButtonMenuItem](https://eto.picoe.ca/api/type/eto.forms.buttonmenuitem.md): [Image](https://eto.picoe.ca/api/type/eto.forms.buttonmenuitem/image.md), [Items](https://eto.picoe.ca/api/type/eto.forms.buttonmenuitem/items.md), [Trim](https://eto.picoe.ca/api/type/eto.forms.buttonmenuitem/trim.md), [OnLoad](https://eto.picoe.ca/api/type/eto.forms.buttonmenuitem/onload.md), [OnUnLoad](https://eto.picoe.ca/api/type/eto.forms.buttonmenuitem/onunload.md)
- From [MenuItem](https://eto.picoe.ca/api/type/eto.forms.menuitem.md): [Command](https://eto.picoe.ca/api/type/eto.forms.menuitem/command.md), [CommandParameter](https://eto.picoe.ca/api/type/eto.forms.menuitem/commandparameter.md), [Enabled](https://eto.picoe.ca/api/type/eto.forms.menuitem/enabled.md), [Order](https://eto.picoe.ca/api/type/eto.forms.menuitem/order.md), [Shortcut](https://eto.picoe.ca/api/type/eto.forms.menuitem/shortcut.md), [Tag](https://eto.picoe.ca/api/type/eto.forms.menuitem/tag.md), [Text](https://eto.picoe.ca/api/type/eto.forms.menuitem/text.md), [ToolTip](https://eto.picoe.ca/api/type/eto.forms.menuitem/tooltip.md), [Visible](https://eto.picoe.ca/api/type/eto.forms.menuitem/visible.md), [Click](https://eto.picoe.ca/api/type/eto.forms.menuitem/click.md), [Validate](https://eto.picoe.ca/api/type/eto.forms.menuitem/validate.md), [OnClick](https://eto.picoe.ca/api/type/eto.forms.menuitem/onclick.md), [OnValidate](https://eto.picoe.ca/api/type/eto.forms.menuitem/onvalidate.md), [PerformClick](https://eto.picoe.ca/api/type/eto.forms.menuitem/performclick.md), [PerformValidate](https://eto.picoe.ca/api/type/eto.forms.menuitem/performvalidate.md), [Unbind](https://eto.picoe.ca/api/type/eto.forms.menuitem/unbind.md)
- From [Menu](https://eto.picoe.ca/api/type/eto.forms.menu.md): [OnPreLoad](https://eto.picoe.ca/api/type/eto.forms.menu/onpreload.md)
- From [BindableWidget](https://eto.picoe.ca/api/type/eto.forms.bindablewidget.md): [Bindings](https://eto.picoe.ca/api/type/eto.forms.bindablewidget/bindings.md), [DataContext](https://eto.picoe.ca/api/type/eto.forms.bindablewidget/datacontext.md), [IsDataContextChanging](https://eto.picoe.ca/api/type/eto.forms.bindablewidget/isdatacontextchanging.md), [Parent](https://eto.picoe.ca/api/type/eto.forms.bindablewidget/parent.md), [Parents](https://eto.picoe.ca/api/type/eto.forms.bindablewidget/parents.md), [DataContextChanged](https://eto.picoe.ca/api/type/eto.forms.bindablewidget/datacontextchanged.md), [FindParent](https://eto.picoe.ca/api/type/eto.forms.bindablewidget/findparent.md), [OnDataContextChanged](https://eto.picoe.ca/api/type/eto.forms.bindablewidget/ondatacontextchanged.md), [UpdateBindings](https://eto.picoe.ca/api/type/eto.forms.bindablewidget/updatebindings.md)
- From [Widget](https://eto.picoe.ca/api/type/eto.widget.md): [ControlObject](https://eto.picoe.ca/api/type/eto.widget/controlobject.md), [Handler](https://eto.picoe.ca/api/type/eto.widget/handler.md), [ID](https://eto.picoe.ca/api/type/eto.widget/id.md), [IsDisposed](https://eto.picoe.ca/api/type/eto.widget/isdisposed.md), [NativeHandle](https://eto.picoe.ca/api/type/eto.widget/nativehandle.md), [Platform](https://eto.picoe.ca/api/type/eto.widget/platform.md), [Properties](https://eto.picoe.ca/api/type/eto.widget/properties.md), [Style](https://eto.picoe.ca/api/type/eto.widget/style.md), [StyleChanged](https://eto.picoe.ca/api/type/eto.widget/stylechanged.md), [Dispose](https://eto.picoe.ca/api/type/eto.widget/dispose.md), [Initialize](https://eto.picoe.ca/api/type/eto.widget/initialize.md), [OnStyleChanged](https://eto.picoe.ca/api/type/eto.widget/onstylechanged.md), [ToString](https://eto.picoe.ca/api/type/eto.widget/tostring.md)
