# MenuItemProps

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-view/generated/builders/trait-menuitemprops/

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

```rust
trait MenuItemProps: ElementBuilder
```

The properties and routed events of `MenuItem`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L5053)

## Members

- [`command`](#function-command)
- [`hot_key`](#function-hot_key)
- [`command_parameter`](#function-command_parameter)
- [`icon`](#function-icon)
- [`input_gesture`](#function-input_gesture)
- [`is_sub_menu_open`](#function-is_sub_menu_open)
- [`stays_open_on_click`](#function-stays_open_on_click)
- [`toggle_type`](#function-toggle_type)
- [`is_checked`](#function-is_checked)
- [`group_name`](#function-group_name)
- [`on_click`](#function-on_click)
- [`on_pointer_entered_item`](#function-on_pointer_entered_item)
- [`on_pointer_exited_item`](#function-on_pointer_exited_item)
- [`on_submenu_opened`](#function-on_submenu_opened)

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

### command

```rust
fn command<M>(self: Self, value: impl IntoProp<Option<std::rc::Rc<dyn ferroui_base::input::ICommand>>, M>) -> Self
```

Sets `MenuItem::command_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L5055)

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

### hot_key

```rust
fn hot_key<M>(self: Self, value: impl IntoProp<Option<ferroui_base::input::KeyGesture>, M>) -> Self
```

Sets `MenuItem::hot_key_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L5060)

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

### command_parameter

```rust
fn command_parameter<M>(self: Self, value: impl IntoProp<Option<ferroui_base::BoxedValue>, M>) -> Self
```

Sets `MenuItem::command_parameter_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L5065)

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

### icon

```rust
fn icon<M>(self: Self, value: impl IntoProp<Option<ferroui_base::BoxedValue>, M>) -> Self
```

Sets `MenuItem::icon_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L5070)

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

### input_gesture

```rust
fn input_gesture<M>(self: Self, value: impl IntoProp<Option<ferroui_base::input::KeyGesture>, M>) -> Self
```

Sets `MenuItem::input_gesture_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L5075)

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

### is_sub_menu_open

```rust
fn is_sub_menu_open<M>(self: Self, value: impl IntoProp<bool, M>) -> Self
```

Sets `MenuItem::is_sub_menu_open_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L5080)

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

### stays_open_on_click

```rust
fn stays_open_on_click<M>(self: Self, value: impl IntoProp<bool, M>) -> Self
```

Sets `MenuItem::stays_open_on_click_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L5085)

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

### toggle_type

```rust
fn toggle_type<M>(self: Self, value: impl IntoProp<ferroui_controls::MenuItemToggleType, M>) -> Self
```

Sets `MenuItem::toggle_type_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L5090)

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

### is_checked

```rust
fn is_checked<M>(self: Self, value: impl IntoProp<bool, M>) -> Self
```

Sets `MenuItem::is_checked_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L5095)

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

### group_name

```rust
fn group_name<M>(self: Self, value: impl IntoProp<Option<String>, M>) -> Self
```

Sets `MenuItem::group_name_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L5100)

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

### on_click

```rust
fn on_click(self: Self, handler: impl Fn(&ferroui_base::interactivity::RoutedEventArgs) -> () + 'static) -> Self
```

Handles `MenuItem::click_event`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L5105)

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

### on_pointer_entered_item

```rust
fn on_pointer_entered_item(self: Self, handler: impl Fn(&ferroui_base::interactivity::RoutedEventArgs) -> () + 'static) -> Self
```

Handles `MenuItem::pointer_entered_item_event`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L5110)

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

### on_pointer_exited_item

```rust
fn on_pointer_exited_item(self: Self, handler: impl Fn(&ferroui_base::interactivity::RoutedEventArgs) -> () + 'static) -> Self
```

Handles `MenuItem::pointer_exited_item_event`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L5115)

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

### on_submenu_opened

```rust
fn on_submenu_opened(self: Self, handler: impl Fn(&ferroui_base::interactivity::RoutedEventArgs) -> () + 'static) -> Self
```

Handles `MenuItem::submenu_opened_event`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L5120)

## Trait implementations

- [`MenuItemProps`](/docs/0.5.0/api/ferroui-view/generated/builders/trait-menuitemprops/)

## Availability

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