Edit

Share via


TabWidthMode Enum

Definition

Possible modes for how to layout a TabViewItem Header's Width in the TabView.

public enum TabWidthMode
type TabWidthMode = 
Public Enum TabWidthMode
Inheritance
TabWidthMode

Fields

Name Value Description
Actual 0

Each tab header takes up as much space as it needs. This is similar to how WPF and Visual Studio Code behave. Suggest to keep IsCloseButtonOverlay set to false. SelectedTabWidth is ignored. In this scenario, tab width behavior is effectively turned off. This can be useful when using custom styling or a custom panel for layout of TabViewItem as well.

Compact 1

Each tab header will use the minimal space set by Windows.UI.Xaml.FrameworkElement.MinWidth on the TabViewItem. Suggest to set the SelectedTabWidth to show more content for the selected item.

Equal 2

Each tab header will fill to fit the available space. If SelectedTabWidth is set, that will be used as a Maximum Width. This is similar to how Microsoft Edge behaves when used with the SelectedTabWidth. Suggest to set IsCloseButtonOverlay to true. Suggest to set SelectedTabWidth to 200 and the TabViewItemHeaderMinWidth Resource to 90.

Applies to