# BindingTriggerBehavior

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-xaml-interactions-custom/struct-bindingtriggerbehavior/

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

```rust
struct BindingTriggerBehavior
```

A behavior that performs actions when the bound data meets a specified condition.

The binding itself is assigned to `binding` (markup assigns it as it is) and
bound by the behavior to a private property; the comparison of its value with
`value` runs when the behavior is initialized, then in a job of the dispatcher
after one of them changed.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/core/binding_trigger_behavior.rs#L24)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`binding_property`](#function-binding_property)
- [`comparison_condition_property`](#function-comparison_condition_property)
- [`value_property`](#function-value_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`binding`](#function-binding)
- [`set_binding`](#function-set_binding)
- [`comparison_condition`](#function-comparison_condition)
- [`set_comparison_condition`](#function-set_comparison_condition)
- [`value`](#function-value)
- [`set_trigger_value`](#function-set_trigger_value)

<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.Interactions.Custom/core/binding_trigger_behavior.rs#L29)

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

### to_ref

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

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/core/binding_trigger_behavior.rs#L29)

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

### binding_property

```rust
fn binding_property() -> &'static StyledProperty<Option<Rc<dyn BindingBase>>>
```

Identifies the `Binding` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/core/binding_trigger_behavior.rs#L40)

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

### comparison_condition_property

```rust
fn comparison_condition_property() -> &'static StyledProperty<ComparisonConditionType>
```

Identifies the `ComparisonCondition` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/core/binding_trigger_behavior.rs#L40)

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

### value_property

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

Identifies the `Value` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/core/binding_trigger_behavior.rs#L40)

<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.Interactions.Custom/core/binding_trigger_behavior.rs#L118)

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

### new

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

Creates a trigger.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/core/binding_trigger_behavior.rs#L123)

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

### binding

```rust
fn binding(self: &Self) -> Option<Rc<dyn BindingBase>>
```

Gets or sets the bound object that the `BindingTriggerBehavior` will listen to. This is
a property of the object model, to which markup assigns a binding as it is.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/core/binding_trigger_behavior.rs#L129)

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

### set_binding

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/core/binding_trigger_behavior.rs#L133)

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

### comparison_condition

```rust
fn comparison_condition(self: &Self) -> ComparisonConditionType
```

Gets or sets the type of comparison to be performed between the value of
`binding` and `value`. This is a property of the object
model.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/core/binding_trigger_behavior.rs#L140)

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

### set_comparison_condition

```rust
fn set_comparison_condition(self: &Self, value: ComparisonConditionType)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/core/binding_trigger_behavior.rs#L144)

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

### value

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

Gets or sets the value to be compared with the value of `binding`. This
is a property of the object model.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/core/binding_trigger_behavior.rs#L150)

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

### set_trigger_value

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

Sets the value to be compared (named apart from the setter of every property of the
object, as `DataTriggerBehavior` names its own).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/core/binding_trigger_behavior.rs#L156)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `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`
- [`StyledElementBehaviorImplExt`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementbehaviorimplext/)
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<BindingTriggerBehavior>`](/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/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`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/).
