# TabItem

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

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

```rust
struct TabItem
```

An item in a `TabControl`.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`PSEUDO_CLASSES`](#assoc_const-pseudo_classes)
- [`tab_strip_placement_property`](#function-tab_strip_placement_property)
- [`is_selected_property`](#function-is_selected_property)
- [`icon_property`](#function-icon_property)
- [`icon_template_property`](#function-icon_template_property)
- [`indicator_template_property`](#function-indicator_template_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`tab_strip_placement`](#function-tab_strip_placement)
- [`is_selected`](#function-is_selected)
- [`set_is_selected`](#function-set_is_selected)
- [`icon`](#function-icon)
- [`set_icon`](#function-set_icon)
- [`icon_template`](#function-icon_template)
- [`set_icon_template`](#function-set_icon_template)
- [`indicator_template`](#function-indicator_template)
- [`set_indicator_template`](#function-set_indicator_template)
- [`update_selection_from_event`](#function-update_selection_from_event)

<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/tab_item.rs#L32)

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

### to_ref

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

Returns a strong reference to this object.

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

<a id="assoc_const-pseudo_classes"></a>

### PSEUDO_CLASSES

```rust
const PSEUDO_CLASSES: PseudoClassesAttribute
```

The pseudoclasses set by the class.

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

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

### tab_strip_placement_property

```rust
fn tab_strip_placement_property() -> &'static DirectProperty<TabItem, Option<Dock>>
```

Defines the `TabStripPlacement` property.

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

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

### is_selected_property

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

Defines the `IsSelected` property.

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

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

### icon_property

```rust
fn icon_property() -> &'static StyledProperty<Option<BoxedValue>>
```

Defines the `Icon` property.

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

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

### icon_template_property

```rust
fn icon_template_property() -> &'static StyledProperty<Option<Rc<dyn IDataTemplate>>>
```

Defines the `IconTemplate` property.

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

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

### indicator_template_property

```rust
fn indicator_template_property() -> &'static StyledProperty<Option<Rc<dyn IDataTemplate>>>
```

Defines the `IndicatorTemplate` property.

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

<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/tab_item.rs#L151)

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

### new

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



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

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

### tab_strip_placement

```rust
fn tab_strip_placement(self: &Self) -> Option<Dock>
```

Gets the placement of this tab relative to the outer `TabControl`,
if there is one.

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

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

### is_selected

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

Gets or sets the selection state of the item.

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

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

### set_is_selected

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



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

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

### icon

```rust
fn icon(self: &Self) -> Option<BoxedValue>
```

Gets or sets the icon displayed alongside the tab header.

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

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

### set_icon

```rust
fn set_icon(self: &Self, value: Option<BoxedValue>)
```



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

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

### icon_template

```rust
fn icon_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
```

Gets or sets the data template used to display the icon of the
control.

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

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

### set_icon_template

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



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

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

### indicator_template

```rust
fn indicator_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
```

Gets or sets the data template used to render the selection
indicator.

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

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

### set_indicator_template

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



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

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

### update_selection_from_event

```rust
fn update_selection_from_event(self: &Self, e: &dyn IRoutedEventArgs) -> bool
```

Updates the selection of the owning selecting items control from an
event raised on this container.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`TemplatedControlImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimplext/)
- [`ContentControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-contentcontrolimplext/)
- [`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<TabItem>`](/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/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`ContentControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-contentcontrolimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`ISelectable`](/docs/0.5.0/api/ferroui-controls/trait-iselectable/)
- [`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/).
