Table of Contents

Class TabItem

Namespace
Avalonia.Controls
Assembly
Avalonia.Controls.dll

An item in a TabControl.

[PseudoClasses(new string[] { ":pressed", ":selected" })]
public class TabItem : HeaderedContentControl, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue, ISelectable
Inheritance
TabItem
Implements
Inherited Members
Extension Methods

Constructors

TabItem()

public TabItem()

Fields

IsSelectedProperty

Defines the IsSelected property.

public static readonly StyledProperty<bool> IsSelectedProperty

Field Value

StyledProperty<bool>

TabStripPlacementProperty

Defines the TabStripPlacement property.

public static readonly DirectProperty<TabItem, Dock?> TabStripPlacementProperty

Field Value

DirectProperty<TabItem, Dock?>

Properties

IsSelected

Gets or sets the selection state of the item.

public bool IsSelected { get; set; }

Property Value

bool

TabStripPlacement

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

public Dock? TabStripPlacement { get; }

Property Value

Dock?

Methods

OnAccessKey(RoutedEventArgs)

This method is used to execute the action on an effective IInputElement when a corresponding access key has been invoked. By default, the Focus() method is invoked with the NavigationMethod.Tab to indicate a visual focus adorner. Overwrite this method if other methods or additional functionality is needed when an item should receive the focus.

protected override void OnAccessKey(RoutedEventArgs e)

Parameters

e RoutedEventArgs

AccessKeyEventArgs are passed on to indicate if there are multiple matches or not.

OnCreateAutomationPeer()

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

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

The type-specific AutomationPeer implementation.

SubscribeToOwnerProperties(AvaloniaObject)

[Obsolete("Owner manages its children properties by itself")]
protected void SubscribeToOwnerProperties(AvaloniaObject owner)

Parameters

owner AvaloniaObject