# ClickEventTrigger

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

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

```rust
struct ClickEventTrigger
```

Trigger that emulates `Button` click semantics on any `Control`.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`source_control_property`](#function-source_control_property)
- [`click_mode_property`](#function-click_mode_property)
- [`routing_strategies_property`](#function-routing_strategies_property)
- [`key_modifiers_property`](#function-key_modifiers_property)
- [`is_default_property`](#function-is_default_property)
- [`is_cancel_property`](#function-is_cancel_property)
- [`flyout_property`](#function-flyout_property)
- [`use_attached_flyout_property`](#function-use_attached_flyout_property)
- [`handle_event_property`](#function-handle_event_property)
- [`handled_events_too_property`](#function-handled_events_too_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`source_control`](#function-source_control)
- [`set_source_control`](#function-set_source_control)
- [`click_mode`](#function-click_mode)
- [`set_click_mode`](#function-set_click_mode)
- [`routing_strategies`](#function-routing_strategies)
- [`set_routing_strategies`](#function-set_routing_strategies)
- [`key_modifiers`](#function-key_modifiers)
- [`set_key_modifiers`](#function-set_key_modifiers)
- [`is_default`](#function-is_default)
- [`set_is_default`](#function-set_is_default)
- [`is_cancel`](#function-is_cancel)
- [`set_is_cancel`](#function-set_is_cancel)
- [`flyout`](#function-flyout)
- [`set_flyout`](#function-set_flyout)
- [`use_attached_flyout`](#function-use_attached_flyout)
- [`set_use_attached_flyout`](#function-set_use_attached_flyout)
- [`handle_event`](#function-handle_event)
- [`set_handle_event`](#function-set_handle_event)
- [`handled_events_too`](#function-handled_events_too)
- [`set_handled_events_too`](#function-set_handled_events_too)

<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/click_event_trigger.rs#L48)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### source_control_property

```rust
fn source_control_property() -> &'static StyledProperty<Option<ElementRef<Control>>>
```

Identifies the `source_control` property.

Deviation (DEVIATIONS.md, Behaviors): the trigger does not own the control, so the
value is an element reference.

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

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

### click_mode_property

```rust
fn click_mode_property() -> &'static StyledProperty<ClickMode>
```

Identifies the `click_mode` property.

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

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

### routing_strategies_property

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

Identifies the `routing_strategies` property.

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

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

### key_modifiers_property

```rust
fn key_modifiers_property() -> &'static StyledProperty<Option<KeyModifiers>>
```

Identifies the `key_modifiers` property.

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

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

### is_default_property

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

Identifies the `is_default` property.

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

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

### is_cancel_property

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

Identifies the `is_cancel` property.

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

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

### flyout_property

```rust
fn flyout_property() -> &'static StyledProperty<Option<Ref<FlyoutBase>>>
```

Identifies the `flyout` property.

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

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

### use_attached_flyout_property

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

Identifies the `use_attached_flyout` property.

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

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

### handle_event_property

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

Identifies the `handle_event` property.

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

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

### handled_events_too_property

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

Identifies the `handled_events_too` property.

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

<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/click_event_trigger.rs#L159)

<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/click_event_trigger.rs#L171)

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

### source_control

```rust
fn source_control(self: &Self) -> Option<Ref<Control>>
```

Gets or sets the source control from which this trigger listens for click semantics. If
not set, it defaults to the associated object. 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/input_element/triggers/click_event_trigger.rs#L178)

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

### set_source_control

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



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

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

### click_mode

```rust
fn click_mode(self: &Self) -> ClickMode
```

Gets or sets how this trigger reacts to pointer and keyboard clicks.

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

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

### set_click_mode

```rust
fn set_click_mode(self: &Self, value: ClickMode)
```



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

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

### routing_strategies

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

Gets or sets the routed event strategies used when subscribing to pointer and keyboard
input events.

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

<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/input_element/triggers/click_event_trigger.rs#L201)

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

### key_modifiers

```rust
fn key_modifiers(self: &Self) -> Option<KeyModifiers>
```

Gets or sets required key modifiers for click execution.

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

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

### set_key_modifiers

```rust
fn set_key_modifiers(self: &Self, value: Option<KeyModifiers>)
```



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

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

### is_default

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

Gets or sets whether Enter on the visual root should invoke this trigger.

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

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

### set_is_default

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



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

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

### is_cancel

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

Gets or sets whether Escape on the visual root should invoke this trigger.

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

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

### set_is_cancel

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



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

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

### flyout

```rust
fn flyout(self: &Self) -> Option<Ref<FlyoutBase>>
```

Gets or sets an explicit flyout instance used for toggle-on-click behavior. Markup resolves
a name given for it to the named flyout.

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

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

### set_flyout

```rust
fn set_flyout(self: &Self, value: Option<Ref<FlyoutBase>>)
```



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

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

### use_attached_flyout

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

Gets or sets whether to fallback to the attached flyout of the source control
(`FlyoutBase::get_attached_flyout`) when `flyout` is not set.

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

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

### set_use_attached_flyout

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



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

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

### handle_event

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

Gets or sets whether handled semantics should be applied to routed events.

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

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

### set_handle_event

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



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

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

### handled_events_too

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

Gets or sets whether this trigger should receive already handled routed events.

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

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

### set_handled_events_too

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



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

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