You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The value of TabView.CloseButtonOverlayMode is not reflected on new tabs added in runtime. New tabs always have their close button visible.
Steps to reproduce the bug
Using the template studio for WinUI, i updated MainPage.xaml and MainViewModel with the code below.
Tabs added with the "Add"-button show their close buttons.
Switching CloseButtonOverlayMode in runtime (which btw does not seem to respond to binding) seems to effect the existing tabs, but when adding more tabs they always show the close button.
MainViewModel:
using System.Collections.ObjectModel;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
namespace App2.ViewModels;
public partial class MainViewModel : ObservableRecipient
{
[ObservableProperty]
private ObservableCollection<string> _tabs = new();
private int _counter = 0;
[RelayCommand]
private void Add()
{
Tabs.Add($"Content {_counter++}");
}
}
Observed the same issue on WinAppSDK 1.5.
I need to assign a value to CloseButtonOverlayMode every time I add an item to TabView.
It seems that this problem has existed for at least two years, but MS has not fixed it.
Describe the bug
The value of TabView.CloseButtonOverlayMode is not reflected on new tabs added in runtime. New tabs always have their close button visible.
Steps to reproduce the bug
Using the template studio for WinUI, i updated MainPage.xaml and MainViewModel with the code below.
Tabs added with the "Add"-button show their close buttons.
Switching CloseButtonOverlayMode in runtime (which btw does not seem to respond to binding) seems to effect the existing tabs, but when adding more tabs they always show the close button.
MainViewModel:
MainPage.xaml:
Expected behavior
Added TabItems in a TabView should respect the CloseButtonOverlayMode property.
Screenshots
NuGet package version
WinUI 3 - Windows App SDK 1.4.3: 1.4.231115000
Windows version
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: