# CommandCanExecuteIsEnabledBinder

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

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

```rust
struct CommandCanExecuteIsEnabledBinder
```

Makes the `IsEnabled` property of an input element follow whether a command can execute: while
it cannot, an `IsEnabled = false` value of the animation priority overlays the value of the
element (one overlay per element, counted across the binders that block it).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/helpers/command_can_execute_is_enabled_binder.rs#L14)

## Members

- [`TYPE`](#assoc_const-type)
- [`new`](#function-new)
- [`update`](#function-update)
- [`stop`](#function-stop)

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

### TYPE

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

The runtime type of this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/helpers/command_can_execute_is_enabled_binder.rs#L25)

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

### new

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

Creates a binder that blocks nothing.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/helpers/command_can_execute_is_enabled_binder.rs#L41)

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

### update

```rust
fn update(self: &Self, target: Option<Ref<InputElement>>, enabled: bool, can_execute: Rc<dyn IObservable<bool>>)
```

Makes the `IsEnabled` property of `target` follow `can_execute` when `enabled`; stops
otherwise.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/helpers/command_can_execute_is_enabled_binder.rs#L47)

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

### stop

```rust
fn stop(self: &Self)
```

Stops following the command and removes the overlay this binder added.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/helpers/command_can_execute_is_enabled_binder.rs#L75)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Default`
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`IDisposable`](/docs/0.5.0/api/ferroui-base/reactive/use-idisposable/)

## Availability

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