# InvokeCommandBehaviorBase

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-xaml-interactivity/struct-invokecommandbehaviorbase/

**struct** · [`ferroui-xaml-interactivity`](/docs/0.5.0/api/ferroui-xaml-interactivity/) · v0.5.0

```rust
struct InvokeCommandBehaviorBase
```

Invoke command behavior base class: a behavior of a `Control` that invokes a command,
reports whether the command can execute (`can_execute_command`)
and can make the control follow it (`use_command_can_execute_for_is_enabled`).

The class is abstract.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L23)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`command_property`](#function-command_property)
- [`can_execute_command_property`](#function-can_execute_command_property)
- [`can_execute_command_parameter_property`](#function-can_execute_command_parameter_property)
- [`use_command_can_execute_for_is_enabled_property`](#function-use_command_can_execute_for_is_enabled_property)
- [`command_parameter_property`](#function-command_parameter_property)
- [`input_converter_property`](#function-input_converter_property)
- [`input_converter_parameter_property`](#function-input_converter_parameter_property)
- [`input_converter_language_property`](#function-input_converter_language_property)
- [`construct`](#function-construct)
- [`command`](#function-command)
- [`set_command`](#function-set_command)
- [`can_execute_command`](#function-can_execute_command)
- [`can_execute_command_parameter`](#function-can_execute_command_parameter)
- [`set_can_execute_command_parameter`](#function-set_can_execute_command_parameter)
- [`use_command_can_execute_for_is_enabled`](#function-use_command_can_execute_for_is_enabled)
- [`set_use_command_can_execute_for_is_enabled`](#function-set_use_command_can_execute_for_is_enabled)
- [`command_parameter`](#function-command_parameter)
- [`set_command_parameter`](#function-set_command_parameter)
- [`input_converter`](#function-input_converter)
- [`set_input_converter`](#function-set_input_converter)
- [`input_converter_parameter`](#function-input_converter_parameter)
- [`set_input_converter_parameter`](#function-set_input_converter_parameter)
- [`input_converter_language`](#function-input_converter_language)
- [`set_input_converter_language`](#function-set_input_converter_language)
- [`pass_event_args_to_command`](#function-pass_event_args_to_command)
- [`set_pass_event_args_to_command`](#function-set_pass_event_args_to_command)
- [`resolve_parameter`](#function-resolve_parameter)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L31)

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

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<InvokeCommandBehaviorBase>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L31)

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

### command_property

```rust
fn command_property() -> &'static StyledProperty<Option<Rc<dyn ICommand>>>
```

Identifies the `Command` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L44)

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

### can_execute_command_property

```rust
fn can_execute_command_property() -> &'static DirectProperty<InvokeCommandBehaviorBase, bool>
```

Identifies the `CanExecuteCommand` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L44)

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

### can_execute_command_parameter_property

```rust
fn can_execute_command_parameter_property() -> &'static StyledProperty<Option<BoxedValue>>
```

Identifies the `CanExecuteCommandParameter` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L44)

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

### use_command_can_execute_for_is_enabled_property

```rust
fn use_command_can_execute_for_is_enabled_property() -> &'static StyledProperty<bool>
```

Identifies the `UseCommandCanExecuteForIsEnabled` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L44)

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

### command_parameter_property

```rust
fn command_parameter_property() -> &'static StyledProperty<Option<BoxedValue>>
```

Identifies the `CommandParameter` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L44)

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

### input_converter_property

```rust
fn input_converter_property() -> &'static StyledProperty<Option<Rc<dyn IValueConverter>>>
```

Identifies the `InputConverter` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L44)

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

### input_converter_parameter_property

```rust
fn input_converter_parameter_property() -> &'static StyledProperty<Option<BoxedValue>>
```

Identifies the `InputConverterParameter` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L44)

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

### input_converter_language_property

```rust
fn input_converter_language_property() -> &'static StyledProperty<Option<String>>
```

Identifies the `InputConverterLanguage` property. The empty string of the default
value means the invariant culture.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L44)

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

### construct

```rust
fn construct() -> Self
```

Creates the class data; see `ferroui_base::FerroObject::construct`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L149)

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

### command

```rust
fn command(self: &Self) -> Option<Rc<dyn ICommand>>
```

Gets or sets the command this behavior should invoke.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L160)

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

### set_command

```rust
fn set_command(self: &Self, value: Option<Rc<dyn ICommand>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L164)

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

### can_execute_command

```rust
fn can_execute_command(self: &Self) -> bool
```

Gets a value indicating whether `command` can execute with the current
can-execute parameter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L170)

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

### can_execute_command_parameter

```rust
fn can_execute_command_parameter(self: &Self) -> Option<BoxedValue>
```

Gets or sets the parameter that is passed to the `can_execute` of the command. When it is
not set, `command_parameter` is used if it is set. It does not
change the parameter passed to the `execute` of the command.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L181)

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

### set_can_execute_command_parameter

```rust
fn set_can_execute_command_parameter(self: &Self, value: Option<BoxedValue>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L185)

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

### use_command_can_execute_for_is_enabled

```rust
fn use_command_can_execute_for_is_enabled(self: &Self) -> bool
```

Gets or sets a value indicating whether the `IsEnabled` property of the associated control
should follow `can_execute_command`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L191)

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

### set_use_command_can_execute_for_is_enabled

```rust
fn set_use_command_can_execute_for_is_enabled(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L195)

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

### command_parameter

```rust
fn command_parameter(self: &Self) -> Option<BoxedValue>
```

Gets or sets the parameter that is passed to the `execute` of the command. If this is not
set, the parameter given to the behavior is used.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L201)

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

### set_command_parameter

```rust
fn set_command_parameter(self: &Self, value: Option<BoxedValue>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L205)

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

### input_converter

```rust
fn input_converter(self: &Self) -> Option<Rc<dyn IValueConverter>>
```

Gets or sets the converter that is run on the parameter given to the behavior.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L210)

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

### set_input_converter

```rust
fn set_input_converter(self: &Self, value: Option<Rc<dyn IValueConverter>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L214)

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

### input_converter_parameter

```rust
fn input_converter_parameter(self: &Self) -> Option<BoxedValue>
```

Gets or sets the parameter that is passed to the `convert` of the
`input_converter`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L220)

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

### set_input_converter_parameter

```rust
fn set_input_converter_parameter(self: &Self, value: Option<BoxedValue>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L224)

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

### input_converter_language

```rust
fn input_converter_language(self: &Self) -> Option<String>
```

Gets or sets the language that is passed to the `convert` of the
`input_converter`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L230)

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

### set_input_converter_language

```rust
fn set_input_converter_language(self: &Self, value: Option<String>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L234)

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

### pass_event_args_to_command

```rust
fn pass_event_args_to_command(self: &Self) -> bool
```

Specifies whether the event args of the event that triggered this behavior should be passed
to the command as a parameter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L240)

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

### set_pass_event_args_to_command

```rust
fn set_pass_event_args_to_command(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L244)

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

### resolve_parameter

```rust
fn resolve_parameter(self: &Self, parameter: Option<&BoxedValue>) -> Option<BoxedValue>
```

Resolves the command parameter that will be supplied to the command: the
`command_parameter` if it is set, else the parameter given to
the behavior converted by the `input_converter`, else the
parameter itself if `pass_event_args_to_command`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/behaviors/invoke_command_behavior_base.rs#L263)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`StyledElementBehaviorImplExt`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementbehaviorimplext/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<InvokeCommandBehaviorBase>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`StyledElementBehaviorImpl`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementbehaviorimpl/)

## Availability

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