# TextInputTrigger

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

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

```rust
struct TextInputTrigger
```

A trigger of `InputElement::text_input_event`: runs the actions with the text input args as
the parameter when the text is input (any text when it is not set).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/input_element/triggers/text_input_trigger.rs#L18)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`text_property`](#function-text_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`text`](#function-text)
- [`set_text`](#function-set_text)

<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/input_element/triggers/text_input_trigger.rs#L22)

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

### to_ref

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

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/input_element/triggers/text_input_trigger.rs#L22)

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

### text_property

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

Identifies the `Text` property.

Deviation (DEVIATIONS.md, Behaviors): the reference registers this property with
`KeyDownTrigger` as its owner, so markup does not find it on this trigger; here it is
registered on its own class (defect corrected).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/input_element/triggers/text_input_trigger.rs#L32)

<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/input_element/triggers/text_input_trigger.rs#L79)

<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/input_element/triggers/text_input_trigger.rs#L84)

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

### text

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

Gets or sets the text that fires the trigger.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/input_element/triggers/text_input_trigger.rs#L89)

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

### set_text

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/input_element/triggers/text_input_trigger.rs#L93)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`AttachedToVisualTreeTriggerBaseImplExt`](/docs/0.5.0/api/ferroui-xaml-interactions-custom/trait-attachedtovisualtreetriggerbaseimplext/)
- [`RoutedEventTriggerBaseOfTImplExt`](/docs/0.5.0/api/ferroui-xaml-interactions-custom/trait-routedeventtriggerbaseoftimplext/)
- `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/)
- [`DisposingTriggerImplExt`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-disposingtriggerimplext/)
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<TextInputTrigger>`](/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/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`StyledElementBehaviorImpl`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementbehaviorimpl/)
- [`DisposingTriggerImpl`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-disposingtriggerimpl/)
- [`AttachedToVisualTreeTriggerBaseImpl`](/docs/0.5.0/api/ferroui-xaml-interactions-custom/trait-attachedtovisualtreetriggerbaseimpl/)
- [`RoutedEventTriggerBaseOfTImpl`](/docs/0.5.0/api/ferroui-xaml-interactions-custom/trait-routedeventtriggerbaseoftimpl/)

## Availability

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