# RoutedEventTriggerBehavior

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

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

```rust
struct RoutedEventTriggerBehavior
```

A behavior that listens for a `RoutedEvent` event on its source and executes its actions
when that event is fired.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`routed_event_property`](#function-routed_event_property)
- [`routing_strategies_property`](#function-routing_strategies_property)
- [`source_interactive_property`](#function-source_interactive_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`routed_event`](#function-routed_event)
- [`set_routed_event`](#function-set_routed_event)
- [`routing_strategies`](#function-routing_strategies)
- [`set_routing_strategies`](#function-set_routing_strategies)
- [`source_interactive`](#function-source_interactive)
- [`set_source_interactive`](#function-set_source_interactive)

<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/routed_event_trigger_behavior.rs#L37)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### routed_event_property

```rust
fn routed_event_property() -> &'static StyledProperty<Option<RoutedEvent>>
```

Identifies the `RoutedEvent` property.

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

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

### routing_strategies_property

```rust
fn routing_strategies_property() -> &'static StyledProperty<RoutingStrategies>
```

Identifies the `RoutingStrategies` property.

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

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

### source_interactive_property

```rust
fn source_interactive_property() -> &'static StyledProperty<Option<ElementRef<Interactive>>>
```

Identifies the `SourceInteractive` property.

Deviation (DEVIATIONS.md, Behaviors): the behavior does not own its source, so the
value is an element reference.

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

<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/routed_event_trigger_behavior.rs#L125)

<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/routed_event_trigger_behavior.rs#L135)

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

### routed_event

```rust
fn routed_event(self: &Self) -> Option<RoutedEvent>
```

Gets or sets routing event to listen for. This is a property of the object model.

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

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

### set_routed_event

```rust
fn set_routed_event(self: &Self, value: Option<RoutedEvent>)
```



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

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

### routing_strategies

```rust
fn routing_strategies(self: &Self) -> RoutingStrategies
```

Gets or sets the routing event `RoutingStrategies`. This is a property of the object
model.

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

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

### set_routing_strategies

```rust
fn set_routing_strategies(self: &Self, value: RoutingStrategies)
```



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

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

### source_interactive

```rust
fn source_interactive(self: &Self) -> Option<Ref<Interactive>>
```

Gets or sets the source object from which this behavior listens for events. If it is not
set, the source will default to the associated object. This is a property of the object
model; markup resolves a name given for it to the named element.

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

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

### set_source_interactive

```rust
fn set_source_interactive(self: &Self, value: impl Into<Nullable<Interactive>>)
```



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

## 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<RoutedEventTriggerBehavior>`](/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/).
