# ControlImpl

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/trait-controlimpl/

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

```rust
trait ControlImpl: InputElementImpl + $crate::Upcast<Control>
```

The overridable members introduced by the class.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/control.rs#L124)

## Members

- [`get_template_focus_target`](#function-get_template_focus_target)
- [`on_loaded`](#function-on_loaded)
- [`on_unloaded`](#function-on_unloaded)
- [`on_size_changed`](#function-on_size_changed)
- [`on_create_automation_peer`](#function-on_create_automation_peer)
- [`effective_context_flyout`](#function-effective_context_flyout)
- [`context_request_generation`](#function-context_request_generation)

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

### get_template_focus_target

```rust
fn get_template_focus_target(this: &Self) -> Option<Ref<Control>>
```

Gets the element that receives the focus adorner.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/control.rs#L124)

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

### on_loaded

```rust
fn on_loaded(this: &Self, e: &RoutedEventArgs)
```

Raises the `Loaded` event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/control.rs#L124)

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

### on_unloaded

```rust
fn on_unloaded(this: &Self, e: &RoutedEventArgs)
```

Raises the `Unloaded` event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/control.rs#L124)

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

### on_size_changed

```rust
fn on_size_changed(this: &Self, e: &SizeChangedEventArgs)
```

Raises the `SizeChanged` event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/control.rs#L124)

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

### on_create_automation_peer

```rust
fn on_create_automation_peer(this: &Self) -> Ref<AutomationPeer>
```

Returns a new, type-specific automation peer implementation for
the control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/control.rs#L124)

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

### effective_context_flyout

```rust
fn effective_context_flyout(this: &Self, for_request: bool) -> Option<Ref<FlyoutBase>>
```

The flyout a context request on the control shows (`for_request`), or
that its keys and cancellation dismiss: `ContextFlyout` by default. A
control whose context flyout belongs to another element (a linked text
container) resolves it here, and may show none for a request. An
addition (`docs/porting/DEVIATIONS.md`, Popup).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/control.rs#L124)

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

### context_request_generation

```rust
fn context_request_generation(this: &Self) -> Option<u64>
```

A counter the control advances when it raises a newer context request
of its own while an older one is being handled; `None` by default. The
context menu and flyout drop the older request when it changed. An
addition (`docs/porting/DEVIATIONS.md`, Popup).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/control.rs#L124)

## Trait implementations

- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)

## Availability

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