# StyledElementBehaviorImpl

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementbehaviorimpl/

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

```rust
trait StyledElementBehaviorImpl: StyledElementImpl + $crate::Upcast<StyledElementBehavior>
```

The overridable members introduced by the class.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/styled_element/styled_element_behavior.rs#L37)

## Members

- [`on_attached`](#function-on_attached)
- [`on_detaching`](#function-on_detaching)
- [`on_attached_to_visual_tree`](#function-on_attached_to_visual_tree)
- [`on_detached_from_visual_tree`](#function-on_detached_from_visual_tree)
- [`on_attached_to_logical_tree_event`](#function-on_attached_to_logical_tree_event)
- [`on_detached_from_logical_tree_event`](#function-on_detached_from_logical_tree_event)
- [`on_loaded`](#function-on_loaded)
- [`on_unloaded`](#function-on_unloaded)
- [`on_initialized_event`](#function-on_initialized_event)
- [`on_data_context_changed_event`](#function-on_data_context_changed_event)
- [`on_resources_changed_event`](#function-on_resources_changed_event)
- [`on_actual_theme_variant_changed_event`](#function-on_actual_theme_variant_changed_event)

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

### on_attached

```rust
fn on_attached(this: &Self)
```

Called after the behavior is attached to the associated object.

Override this to hook up functionality to the associated object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/styled_element/styled_element_behavior.rs#L37)

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

### on_detaching

```rust
fn on_detaching(this: &Self)
```

Called when the behavior is being detached from its associated object.

Override this to unhook functionality from the associated object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/styled_element/styled_element_behavior.rs#L37)

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

### on_attached_to_visual_tree

```rust
fn on_attached_to_visual_tree(this: &Self)
```

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

Invoked only when the associated object is a visual.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/styled_element/styled_element_behavior.rs#L37)

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

### on_detached_from_visual_tree

```rust
fn on_detached_from_visual_tree(this: &Self)
```

Called when the associated object is being detached from the visual tree.

Invoked only when the associated object is a visual.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/styled_element/styled_element_behavior.rs#L37)

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

### on_attached_to_logical_tree_event

```rust
fn on_attached_to_logical_tree_event(this: &Self)
```

Called after the associated object is attached to the logical tree
(`OnAttachedToLogicalTree`).

Invoked only when the associated object is a styled element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/styled_element/styled_element_behavior.rs#L37)

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

### on_detached_from_logical_tree_event

```rust
fn on_detached_from_logical_tree_event(this: &Self)
```

Called when the associated object is being detached from the logical tree
(`OnDetachedFromLogicalTree`).

Invoked only when the associated object is a styled element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/styled_element/styled_element_behavior.rs#L37)

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

### on_loaded

```rust
fn on_loaded(this: &Self)
```

Called after the associated object is loaded.

Invoked only when the associated object is a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/styled_element/styled_element_behavior.rs#L37)

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

### on_unloaded

```rust
fn on_unloaded(this: &Self)
```

Called when the associated object is unloaded.

Invoked only when the associated object is a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/styled_element/styled_element_behavior.rs#L37)

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

### on_initialized_event

```rust
fn on_initialized_event(this: &Self)
```

Called when the associated object is initialized.

Invoked only when the associated object is a styled element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/styled_element/styled_element_behavior.rs#L37)

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

### on_data_context_changed_event

```rust
fn on_data_context_changed_event(this: &Self)
```

Called when the data context of the associated object changed.

Invoked only when the associated object is a styled element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/styled_element/styled_element_behavior.rs#L37)

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

### on_resources_changed_event

```rust
fn on_resources_changed_event(this: &Self)
```

Called when the resources of the associated object changed.

Invoked only when the associated object is a styled element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/styled_element/styled_element_behavior.rs#L37)

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

### on_actual_theme_variant_changed_event

```rust
fn on_actual_theme_variant_changed_event(this: &Self)
```

Called when the actual theme variant of the associated object changed.

Invoked only when the associated object is a styled element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/styled_element/styled_element_behavior.rs#L37)

## Trait implementations

- [`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/).
