# TimerTrigger

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

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

```rust
struct TimerTrigger
```

A trigger that invokes its actions after a specified interval.

The timer starts when the trigger is attached; the event of the trigger (see
`EventTriggerBase`) restarts it.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`milliseconds_per_tick_property`](#function-milliseconds_per_tick_property)
- [`total_ticks_property`](#function-total_ticks_property)
- [`repeat_forever_property`](#function-repeat_forever_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`milliseconds_per_tick`](#function-milliseconds_per_tick)
- [`set_milliseconds_per_tick`](#function-set_milliseconds_per_tick)
- [`total_ticks`](#function-total_ticks)
- [`set_total_ticks`](#function-set_total_ticks)
- [`repeat_forever`](#function-repeat_forever)
- [`set_repeat_forever`](#function-set_repeat_forever)

<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/core/timer_trigger.rs#L28)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### milliseconds_per_tick_property

```rust
fn milliseconds_per_tick_property() -> &'static StyledProperty<i32>
```

Identifies the `MillisecondsPerTick` property.

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

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

### total_ticks_property

```rust
fn total_ticks_property() -> &'static StyledProperty<i32>
```

Identifies the `TotalTicks` property.

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

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

### repeat_forever_property

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

Identifies the `RepeatForever` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions/core/timer_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/core/timer_trigger.rs#L77)

<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/core/timer_trigger.rs#L82)

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

### milliseconds_per_tick

```rust
fn milliseconds_per_tick(self: &Self) -> i32
```

Gets or sets the time, in milliseconds, between timer ticks.

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

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

### set_milliseconds_per_tick

```rust
fn set_milliseconds_per_tick(self: &Self, value: i32)
```



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

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

### total_ticks

```rust
fn total_ticks(self: &Self) -> i32
```

Gets or sets the number of ticks after which the trigger stops firing.

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

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

### set_total_ticks

```rust
fn set_total_ticks(self: &Self, value: i32)
```



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

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

### repeat_forever

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

Gets or sets a value indicating whether the timer repeats indefinitely.

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

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

### set_repeat_forever

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



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

## 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/)
- [`EventTriggerBaseImplExt`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-eventtriggerbaseimplext/)
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<TimerTrigger>`](/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/)
- [`EventTriggerBaseImpl`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-eventtriggerbaseimpl/)

## Availability

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