# MenuItemImpl

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/trait-menuitemimpl/

**trait** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
trait MenuItemImpl: HeaderedSelectingItemsControlImpl + $crate::Upcast<MenuItem>
```

The overridable members introduced by the class.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/menu_item.rs#L65)

## Members

- [`on_click`](#function-on_click)
- [`on_submenu_opened`](#function-on_submenu_opened)

<a id="function-on_click"></a>

### on_click

```rust
fn on_click(this: &Self, e: &RoutedEventArgs)
```

Invoked when an unhandled `Click` event reaches an element in
its route that is derived from this class. Implement this method
to add class handling for this event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/menu_item.rs#L65)

<a id="function-on_submenu_opened"></a>

### on_submenu_opened

```rust
fn on_submenu_opened(this: &Self, e: &RoutedEventArgs)
```

Invoked when an unhandled `SubmenuOpened` event reaches an
element in its route that is derived from this class. Implement
this method to add class handling for this event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/menu_item.rs#L65)

## Trait implementations

- [`MenuItemImpl`](/docs/0.5.0/api/ferroui-controls/trait-menuitemimpl/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
