TabView.CloseButtonOverlayMode Property

Definition

Gets or sets a value that indicates the behavior of the close button within tabs.

This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

public:
 property TabViewCloseButtonOverlayMode CloseButtonOverlayMode { TabViewCloseButtonOverlayMode get(); void set(TabViewCloseButtonOverlayMode value); };
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TabViewCloseButtonOverlayMode::Auto")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TabViewCloseButtonOverlayMode::Auto")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TabViewCloseButtonOverlayMode::Auto")]
TabViewCloseButtonOverlayMode CloseButtonOverlayMode();

void CloseButtonOverlayMode(TabViewCloseButtonOverlayMode value);
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TabViewCloseButtonOverlayMode::Auto")]
public TabViewCloseButtonOverlayMode CloseButtonOverlayMode { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TabViewCloseButtonOverlayMode::Auto")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TabViewCloseButtonOverlayMode::Auto")] set; }
Public Property CloseButtonOverlayMode As TabViewCloseButtonOverlayMode

Property Value

A value of the enumeration that describes the behavior of the close button within tabs. The default is Auto.

Attributes
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

Remarks

Selected TabViewItems that are closable always show their close button regardless of the value of the TabViewCloseButtonOverlayMode property. The TabViewCloseButtonOverlayMode only effects the behavior of the unselected TabViewItems.

If the CloseButtonOverlayMode is set to Always, unselected tabs always show the close button if they are closable.

If the CloseButtonOverlayMode is set to OnPointerOver, unselected tabs show the close button when the tab is closable and the user has their pointer over the tab.

In WinUI 2.4, setting the CloseButtonOverlayMode to Auto results in the same behavior as Always.

Applies to