Edit

Share via


TabView Class

Definition

Caution

Please migrate to the TabView control from WinUI, this control will be removed in a future release. https://aka.ms/winui

TabView is a control for displaying a set of tabs and their content.

[System.Obsolete("Please migrate to the TabView control from WinUI, this control will be removed in a future release. https://aka.ms/winui")]
[Windows.UI.Xaml.TemplatePart(Name="TabContentPresenter", Type=typeof(Windows.UI.Xaml.Controls.ContentPresenter))]
[Windows.UI.Xaml.TemplatePart(Name="TabViewContainer", Type=typeof(Windows.UI.Xaml.Controls.Grid))]
[Windows.UI.Xaml.TemplatePart(Name="TabsItemsPresenter", Type=typeof(Windows.UI.Xaml.Controls.ItemsPresenter))]
[Windows.UI.Xaml.TemplatePart(Name="ScrollViewer", Type=typeof(Windows.UI.Xaml.Controls.ScrollViewer))]
[Windows.UI.Xaml.TemplatePart(Name="ScrollBackButton", Type=typeof(Windows.UI.Xaml.Controls.Primitives.ButtonBase))]
[Windows.UI.Xaml.TemplatePart(Name="ScrollForwardButton", Type=typeof(Windows.UI.Xaml.Controls.Primitives.ButtonBase))]
public class TabView : Windows.UI.Xaml.Controls.ListViewBase
[<System.Obsolete("Please migrate to the TabView control from WinUI, this control will be removed in a future release. https://aka.ms/winui")>]
[<Windows.UI.Xaml.TemplatePart(Name="TabContentPresenter", Type=typeof(Windows.UI.Xaml.Controls.ContentPresenter))>]
[<Windows.UI.Xaml.TemplatePart(Name="TabViewContainer", Type=typeof(Windows.UI.Xaml.Controls.Grid))>]
[<Windows.UI.Xaml.TemplatePart(Name="TabsItemsPresenter", Type=typeof(Windows.UI.Xaml.Controls.ItemsPresenter))>]
[<Windows.UI.Xaml.TemplatePart(Name="ScrollViewer", Type=typeof(Windows.UI.Xaml.Controls.ScrollViewer))>]
[<Windows.UI.Xaml.TemplatePart(Name="ScrollBackButton", Type=typeof(Windows.UI.Xaml.Controls.Primitives.ButtonBase))>]
[<Windows.UI.Xaml.TemplatePart(Name="ScrollForwardButton", Type=typeof(Windows.UI.Xaml.Controls.Primitives.ButtonBase))>]
type TabView = class
    inherit ListViewBase
Public Class TabView
Inherits ListViewBase
Inheritance
Windows.UI.Xaml.Controls.ListViewBase
TabView
Attributes
ObsoleteAttribute Windows.UI.Xaml.TemplatePartAttribute

Constructors

TabView()

Initializes a new instance of the TabView class.

Fields

CanCloseTabsProperty

Identifies the CanCloseTabs dependency property.

ConstrainColumnProperty

Identifies the ConstrainColumnProperty attached property.

IgnoreColumnProperty

Identifies the IgnoreColumnProperty attached property.

IsCloseButtonOverlayProperty

Identifies the IsCloseButtonOverlay dependency property.

ItemHeaderTemplateProperty

Identifies the ItemHeaderTemplate dependency property.

SelectedTabWidthProperty

Identifies the SelectedTabWidth dependency property.

TabActionHeaderProperty

Identifies the TabActionHeader dependency property.

TabActionHeaderTemplateProperty

Identifies the TabActionHeaderTemplate dependency property.

TabEndHeaderProperty

Identifies the TabEndHeader dependency property.

TabEndHeaderTemplateProperty

Identifies the TabEndHeaderTemplate dependency property.

TabStartHeaderProperty

Identifies the TabStartHeader dependency property.

TabStartHeaderTemplateProperty

Identifies the TabStartHeaderTemplate dependency property.

TabWidthBehaviorProperty

Identifies the TabWidthBehavior dependency property.

Properties

CanCloseTabs

Gets or sets a value indicating whether by default a Tab can be closed or not if no value to IsClosable is provided.

IsCloseButtonOverlay

Gets or sets a value indicating whether a TabViewItem Close Button should be included in layout calculations.

ItemHeaderTemplate

Gets or sets the default Windows.UI.Xaml.DataTemplate for the HeaderTemplate.

SelectedTabWidth

Gets or sets a value indicating the size of the selected tab. By default this is set to Auto and the selected tab size doesn't change.

TabActionHeader

Gets or sets the content to appear next to the tab strip.

TabActionHeaderTemplate

Gets or sets the Windows.UI.Xaml.DataTemplate for the TabActionHeader.

TabEndHeader

Gets or sets the content to appear to the right or below the tab strip.

TabEndHeaderTemplate

Gets or sets the Windows.UI.Xaml.DataTemplate for the TabEndHeader.

TabStartHeader

Gets or sets the content to appear to the left or above the tab strip.

TabStartHeaderTemplate

Gets or sets the Windows.UI.Xaml.DataTemplate for the TabStartHeader.

TabWidthBehavior

Gets or sets the current TabWidthMode which determins how tab headers' width behave.

Methods

GetConstrainColumn(ColumnDefinition)

Gets the attached value indicating this column should be restricted for the TabViewItem headers.

GetContainerForItemOverride() Windows.UI.Xaml.Controls.ListViewBase.GetContainerForItemOverride
GetIgnoreColumn(ColumnDefinition)

Gets the attached property value to indicate if this grid column should be ignored when calculating header sizes.

IsItemItsOwnContainerOverride(Object) Windows.UI.Xaml.Controls.ListViewBase.IsItemItsOwnContainerOverride(System.Object)
OnApplyTemplate() Windows.UI.Xaml.Controls.ListViewBase.OnApplyTemplate
OnItemsChanged(Object) Windows.UI.Xaml.Controls.ListViewBase.OnItemsChanged(System.Object)
PrepareContainerForItemOverride(DependencyObject, Object) Windows.UI.Xaml.Controls.ListViewBase.PrepareContainerForItemOverride(Windows.UI.Xaml.DependencyObject,System.Object)
SetConstrainColumn(ColumnDefinition, Boolean)

Sets the attached property value for the ConstrainColumnProperty

SetIgnoreColumn(ColumnDefinition, Boolean)

Sets the attached property value for IgnoreColumnProperty

Events

TabClosing

Occurs when a tab's Close button is clicked. Set Cancel to true to prevent automatic Tab Closure.

TabDraggedOutside

Occurs when a tab is dragged by the user outside of the TabView. Generally, this paradigm is used to create a new-window with the torn-off tab. The creation and handling of the new-window is left to the app's developer.

Applies to