TabView.CloseButtonOverlayMode Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that indicates the behavior of the close button within tabs.
public:
property TabViewCloseButtonOverlayMode CloseButtonOverlayMode { TabViewCloseButtonOverlayMode get(); void set(TabViewCloseButtonOverlayMode value); };
/// [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")]
/// [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);
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; }
[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; }
var tabViewCloseButtonOverlayMode = tabView.closeButtonOverlayMode;
tabView.closeButtonOverlayMode = tabViewCloseButtonOverlayMode;
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.