# AttachedToLogicalTreeTriggerBase

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

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

```rust
struct AttachedToLogicalTreeTriggerBase
```

A trigger that executes when the associated object is attached to the logical tree.

The class is abstract. The type argument `T` of the reference (a visual) is the runtime type
passed to `construct` (see
`BehaviorOfT`).

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`on_attached_to_logical_tree_override`](#function-on_attached_to_logical_tree_override)
- [`construct`](#function-construct)

<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/attached_to_logical_tree_trigger_base.rs#L20)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### on_attached_to_logical_tree_override

```rust
fn on_attached_to_logical_tree_override(self: &Self) -> Rc<dyn IDisposable>
```

Called after the associated object is attached to the logical tree.

Returns a disposable resource to be disposed when the trigger is detached.

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

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

### construct

```rust
fn construct(associated_type: &'static TypeInfo) -> Self
```

Creates the class data for triggers attached to visuals of `associated_type` (the `T` of
the reference); see `ferroui_base::FerroObject::construct`.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`AttachedToLogicalTreeTriggerBaseImplExt`](/docs/0.5.0/api/ferroui-xaml-interactions-custom/trait-attachedtologicaltreetriggerbaseimplext/)
- `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<AttachedToLogicalTreeTriggerBase>`](/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/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`AttachedToLogicalTreeTriggerBaseImpl`](/docs/0.5.0/api/ferroui-xaml-interactions-custom/trait-attachedtologicaltreetriggerbaseimpl/)
- [`DisposingTriggerImpl`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-disposingtriggerimpl/)
- [`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/).
