# TemplatedControl

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/primitives/struct-templatedcontrol/

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

```rust
struct TemplatedControl
```

A lookless control whose visual appearance is defined by its `Template`.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`on_apply_template`](#function-on_apply_template)
- [`on_template_changed`](#function-on_template_changed)
- [`background_property`](#function-background_property)
- [`background_sizing_property`](#function-background_sizing_property)
- [`border_brush_property`](#function-border_brush_property)
- [`border_thickness_property`](#function-border_thickness_property)
- [`corner_radius_property`](#function-corner_radius_property)
- [`font_family_property`](#function-font_family_property)
- [`font_features_property`](#function-font_features_property)
- [`font_size_property`](#function-font_size_property)
- [`font_style_property`](#function-font_style_property)
- [`font_weight_property`](#function-font_weight_property)
- [`font_stretch_property`](#function-font_stretch_property)
- [`foreground_property`](#function-foreground_property)
- [`letter_spacing_property`](#function-letter_spacing_property)
- [`padding_property`](#function-padding_property)
- [`template_property`](#function-template_property)
- [`is_template_focus_target_property`](#function-is_template_focus_target_property)
- [`template_applied_event`](#function-template_applied_event)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`template_applied`](#function-template_applied)
- [`background`](#function-background)
- [`set_background`](#function-set_background)
- [`background_sizing`](#function-background_sizing)
- [`set_background_sizing`](#function-set_background_sizing)
- [`border_brush`](#function-border_brush)
- [`set_border_brush`](#function-set_border_brush)
- [`border_thickness`](#function-border_thickness)
- [`set_border_thickness`](#function-set_border_thickness)
- [`corner_radius`](#function-corner_radius)
- [`set_corner_radius`](#function-set_corner_radius)
- [`font_family`](#function-font_family)
- [`set_font_family`](#function-set_font_family)
- [`font_features`](#function-font_features)
- [`set_font_features`](#function-set_font_features)
- [`font_size`](#function-font_size)
- [`set_font_size`](#function-set_font_size)
- [`font_style`](#function-font_style)
- [`set_font_style`](#function-set_font_style)
- [`font_weight`](#function-font_weight)
- [`set_font_weight`](#function-set_font_weight)
- [`font_stretch`](#function-font_stretch)
- [`set_font_stretch`](#function-set_font_stretch)
- [`foreground`](#function-foreground)
- [`set_foreground`](#function-set_foreground)
- [`letter_spacing`](#function-letter_spacing)
- [`set_letter_spacing`](#function-set_letter_spacing)
- [`padding`](#function-padding)
- [`set_padding`](#function-set_padding)
- [`template`](#function-template)
- [`set_template`](#function-set_template)
- [`get_is_template_focus_target`](#function-get_is_template_focus_target)
- [`set_is_template_focus_target`](#function-set_is_template_focus_target)
- [`apply_templated_parent`](#function-apply_templated_parent)
- [`get_template_children`](#function-get_template_children)
- [`get_template_descendants`](#function-get_template_descendants)

<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/FerroUI.Controls/primitives/templated_control.rs#L29)

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

### to_ref

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

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L29)

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

### on_apply_template

```rust
fn on_apply_template(self: &Self, e: &TemplateAppliedEventArgs)
```

Called when the control's template is applied.

In simple terms, this means the method is called just before the
control is displayed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L29)

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

### on_template_changed

```rust
fn on_template_changed(self: &Self, e: &FerroPropertyChangedEventArgs<'_>)
```

Called when the `Template` property changes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L29)

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

### background_property

```rust
fn background_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
```

Defines the `Background` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L150)

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

### background_sizing_property

```rust
fn background_sizing_property() -> &'static StyledProperty<BackgroundSizing>
```

Defines the `BackgroundSizing` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L150)

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

### border_brush_property

```rust
fn border_brush_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
```

Defines the `BorderBrush` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L150)

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

### border_thickness_property

```rust
fn border_thickness_property() -> &'static StyledProperty<Thickness>
```

Defines the `BorderThickness` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L150)

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

### corner_radius_property

```rust
fn corner_radius_property() -> &'static StyledProperty<CornerRadius>
```

Defines the `CornerRadius` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L150)

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

### font_family_property

```rust
fn font_family_property() -> &'static StyledProperty<FontFamily>
```

Defines the `FontFamily` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L150)

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

### font_features_property

```rust
fn font_features_property() -> &'static StyledProperty<Option<FontFeatureCollection>>
```

Defines the `FontFeatures` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L150)

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

### font_size_property

```rust
fn font_size_property() -> &'static StyledProperty<f64>
```

Defines the `FontSize` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L150)

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

### font_style_property

```rust
fn font_style_property() -> &'static StyledProperty<FontStyle>
```

Defines the `FontStyle` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L150)

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

### font_weight_property

```rust
fn font_weight_property() -> &'static StyledProperty<FontWeight>
```

Defines the `FontWeight` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L150)

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

### font_stretch_property

```rust
fn font_stretch_property() -> &'static StyledProperty<FontStretch>
```

Defines the `FontStretch` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L150)

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

### foreground_property

```rust
fn foreground_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
```

Defines the `Foreground` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L150)

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

### letter_spacing_property

```rust
fn letter_spacing_property() -> &'static StyledProperty<f64>
```

Defines the `LetterSpacing` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L150)

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

### padding_property

```rust
fn padding_property() -> &'static StyledProperty<Thickness>
```

Defines the `Padding` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L150)

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

### template_property

```rust
fn template_property() -> &'static StyledProperty<Option<Rc<dyn IControlTemplate>>>
```

Defines the `Template` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L150)

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

### is_template_focus_target_property

```rust
fn is_template_focus_target_property() -> &'static AttachedProperty<bool>
```

Defines the `IsTemplateFocusTarget` attached property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L150)

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

### template_applied_event

```rust
fn template_applied_event() -> &'static RoutedEvent<TemplateAppliedEventArgs>
```

Defines the `TemplateApplied` routed event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L265)

<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/FerroUI.Controls/primitives/templated_control.rs#L278)

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

### new

```rust
fn new() -> Ref<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L282)

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

### template_applied

```rust
fn template_applied(self: &Self, handler: impl Fn(&Interactive, &TemplateAppliedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
```

Raised when the control's template is applied.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L287)

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

### background

```rust
fn background(self: &Self) -> Option<Rc<dyn IBrush>>
```

The brush used to draw the control's background.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L295)

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

### set_background

```rust
fn set_background(self: &Self, value: Option<Rc<dyn IBrush>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L299)

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

### background_sizing

```rust
fn background_sizing(self: &Self) -> BackgroundSizing
```

How the control's background is drawn relative to the control's
border.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L305)

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

### set_background_sizing

```rust
fn set_background_sizing(self: &Self, value: BackgroundSizing)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L309)

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

### border_brush

```rust
fn border_brush(self: &Self) -> Option<Rc<dyn IBrush>>
```

The brush used to draw the control's border.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L314)

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

### set_border_brush

```rust
fn set_border_brush(self: &Self, value: Option<Rc<dyn IBrush>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L318)

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

### border_thickness

```rust
fn border_thickness(self: &Self) -> Thickness
```

The thickness of the control's border.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L323)

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

### set_border_thickness

```rust
fn set_border_thickness(self: &Self, value: Thickness)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L327)

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

### corner_radius

```rust
fn corner_radius(self: &Self) -> CornerRadius
```

The radius of the border rounded corners.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L332)

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

### set_corner_radius

```rust
fn set_corner_radius(self: &Self, value: CornerRadius)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L336)

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

### font_family

```rust
fn font_family(self: &Self) -> FontFamily
```

The font family used to draw the control's text.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L341)

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

### set_font_family

```rust
fn set_font_family(self: &Self, value: FontFamily)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L345)

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

### font_features

```rust
fn font_features(self: &Self) -> Option<FontFeatureCollection>
```

The font features turned on/off.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L350)

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

### set_font_features

```rust
fn set_font_features(self: &Self, value: Option<FontFeatureCollection>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L354)

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

### font_size

```rust
fn font_size(self: &Self) -> f64
```

The size of the control's text in points.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L359)

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

### set_font_size

```rust
fn set_font_size(self: &Self, value: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L363)

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

### font_style

```rust
fn font_style(self: &Self) -> FontStyle
```

The font style used to draw the control's text.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L368)

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

### set_font_style

```rust
fn set_font_style(self: &Self, value: FontStyle)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L372)

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

### font_weight

```rust
fn font_weight(self: &Self) -> FontWeight
```

The font weight used to draw the control's text.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L377)

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

### set_font_weight

```rust
fn set_font_weight(self: &Self, value: FontWeight)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L381)

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

### font_stretch

```rust
fn font_stretch(self: &Self) -> FontStretch
```

The font stretch used to draw the control's text.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L386)

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

### set_font_stretch

```rust
fn set_font_stretch(self: &Self, value: FontStretch)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L390)

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

### foreground

```rust
fn foreground(self: &Self) -> Option<Rc<dyn IBrush>>
```

The brush used to draw the control's text and other foreground elements.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L395)

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

### set_foreground

```rust
fn set_foreground(self: &Self, value: Option<Rc<dyn IBrush>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L399)

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

### letter_spacing

```rust
fn letter_spacing(self: &Self) -> f64
```

The letter spacing for the control's text content.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L404)

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

### set_letter_spacing

```rust
fn set_letter_spacing(self: &Self, value: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L408)

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

### padding

```rust
fn padding(self: &Self) -> Thickness
```

The padding placed between the border of the control and its content.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L413)

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

### set_padding

```rust
fn set_padding(self: &Self, value: Thickness)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L417)

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

### template

```rust
fn template(self: &Self) -> Option<Rc<dyn IControlTemplate>>
```

The template that defines the control's appearance.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L422)

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

### set_template

```rust
fn set_template(self: &Self, value: Option<Rc<dyn IControlTemplate>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L426)

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

### get_is_template_focus_target

```rust
fn get_is_template_focus_target(control: &Control) -> bool
```

Gets the value of the `IsTemplateFocusTarget` attached property on a
control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L432)

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

### set_is_template_focus_target

```rust
fn set_is_template_focus_target(control: &Control, value: bool)
```

Sets the value of the `IsTemplateFocusTarget` attached property on a
control.

When a control is navigated to using the keyboard, a focus adorner is
shown - usually around the control itself. However if the templated
control has a template child with this attached property set to true,
the focus adorner is shown around that control instead.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L443)

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

### apply_templated_parent

```rust
fn apply_templated_parent(control: &StyledElement, templated_parent: Option<&Ref<FerroObject>>)
```

Sets the templated parent of a control and of its logical descendants
that do not have one yet.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/templated_control.rs#L449)

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

### get_template_children

```rust
fn get_template_children(self: &Self) -> Vec<Ref<Control>>
```

Gets the list of all control descendants that are part of the template of this
control: the template descendants that are controls.

> **Deprecated.** Use get_template_descendants

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/templates/template_extensions.rs#L9)

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

### get_template_descendants

```rust
fn get_template_descendants(self: &Self) -> Vec<Ref<Visual>>
```

Gets a visual tree's template descendants: the visual descendants
whose templated parent is this control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/templates/template_extensions.rs#L15)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`TemplatedControlImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimplext/)
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- `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`
- [`InputElementImplExt`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimplext/)
- [`InteractiveImplExt`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimplext/)
- [`LayoutableImplExt`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimplext/)
- [`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/)
- [`VisualImplExt`](/docs/0.5.0/api/ferroui-base/trait-visualimplext/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<TemplatedControl>`](/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/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`TemplatedControlImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimpl/)

## Availability

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