Skip to content

Commit 955d434

Browse files
committed
Small workaround for WinUI's issue 3502 on TabbedCommandBar.
1 parent ff96329 commit 955d434

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CommunityToolkit.WinUI.UI.Controls.Core/TabbedCommandBar/TabbedCommandBar.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5+
using System;
56
using System.Linq;
67
using Microsoft.UI.Xaml;
78
using Microsoft.UI.Xaml.Controls;
@@ -37,6 +38,9 @@ public TabbedCommandBar()
3738
{
3839
DefaultStyleKey = typeof(TabbedCommandBar);
3940

41+
// WinUI3 workaround for https://github.com/microsoft/microsoft-ui-xaml/issues/3502
42+
this.DefaultStyleResourceUri = new Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
43+
4044
SelectionChanged += SelectedItemChanged;
4145
}
4246

0 commit comments

Comments
 (0)