HypernovaDesktop Components · docs
Binarymission
WPF › Tab Control › TabItem

TabItem

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WPF.Controls.Containers

A tab of the TabControl, with a close button.

public class TabItem : System.Windows.Controls.TabItem

Inherits from / implements: System.Windows.Controls.TabItem

Remarks

The close button ( PART_TabItemCloseButton ), a middle click on the header and Ctrl+F4 while the tab is selected all raise CloseTabItemClick; removing the tab is the application's decision, made in its handler.

Members at a glance

IsAnimationEnabledOnMouseEnterGets or sets a value indicating whether this instance is animation enabled on mouse enter.
IsCloseButtonVisibleGets or sets a value indicating whether this tab shows its close button. When it does not, a middle click on the tab and Ctrl+F4 do not ask for it to be closed either.
IsDimmedStateEnabledForUnSelectedItemsGets or sets a value indicating whether this instance is dimmed state enabled for un selected items.
OnApplyTemplateWhen overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.
OnMouseUpAsks for the tab to be closed on a middle click, as a browser's tabs do, when the tab has a close button.
CloseTabItemClickOccurs when the user asks to close this tab: its close button, a middle click on its header, or Ctrl+F4 while it is selected. The tab is not removed unless a handler removes it.
CloseTabItemClickEventThe close tab item click event
IsAnimationEnabledOnMouseEnterPropertyThe is animation enabled on mouse enter property
IsCloseButtonVisiblePropertyIdentifies the IsCloseButtonVisible dependency property.
IsDimmedStateEnabledForUnSelectedItemsPropertyThe is dimmed state enabled for un selected items property

Properties

IsAnimationEnabledOnMouseEnter

public bool IsAnimationEnabledOnMouseEnter

Gets or sets a value indicating whether this instance is animation enabled on mouse enter.

Value. true if this instance is animation enabled on mouse enter; otherwise, false .

IsCloseButtonVisible

public bool IsCloseButtonVisible

Gets or sets a value indicating whether this tab shows its close button. When it does not, a middle click on the tab and Ctrl+F4 do not ask for it to be closed either.

Value. true (the default) to show the close button; false for a tab the user cannot close.

IsDimmedStateEnabledForUnSelectedItems

public bool IsDimmedStateEnabledForUnSelectedItems

Gets or sets a value indicating whether this instance is dimmed state enabled for un selected items.

Value. true if this instance is dimmed state enabled for un selected items; otherwise, false .

Methods

OnApplyTemplate

public override void OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.

OnMouseUp

protected override void OnMouseUp(MouseButtonEventArgs e)

Asks for the tab to be closed on a middle click, as a browser's tabs do, when the tab has a close button.

e
The button that was released.

Events

CloseTabItemClick

public event RoutedEventHandler CloseTabItemClick

Occurs when the user asks to close this tab: its close button, a middle click on its header, or Ctrl+F4 while it is selected. The tab is not removed unless a handler removes it.

Fields

CloseTabItemClickEvent

public static readonly RoutedEvent CloseTabItemClickEvent

The close tab item click event

IsAnimationEnabledOnMouseEnterProperty

public static readonly DependencyProperty IsAnimationEnabledOnMouseEnterProperty

The is animation enabled on mouse enter property

IsCloseButtonVisibleProperty

public static readonly DependencyProperty IsCloseButtonVisibleProperty

Identifies the IsCloseButtonVisible dependency property.

IsDimmedStateEnabledForUnSelectedItemsProperty

public static readonly DependencyProperty IsDimmedStateEnabledForUnSelectedItemsProperty

The is dimmed state enabled for un selected items property