Skip to content

Commit 323e006

Browse files
committed
Fix for DefaultStyleKey not working always when assembly name differs from namespace.
1 parent 02a4d2b commit 323e006

File tree

13 files changed

+13
-1
lines changed

13 files changed

+13
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public async Task StartAsync(CameraHelper cameraHelper)
7777
public CameraPreview()
7878
{
7979
this.DefaultStyleKey = typeof(CameraPreview);
80+
this.DefaultStyleResourceUri = new Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
8081
}
8182

8283
/// <inheritdoc/>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public partial class DropShadowPanel : ContentControl
3333
public DropShadowPanel()
3434
{
3535
this.DefaultStyleKey = typeof(DropShadowPanel);
36+
this.DefaultStyleResourceUri = new Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
3637

3738
if (!DesignTimeHelpers.IsRunningInLegacyDesignerMode)
3839
{

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public ImageEx()
1818
: base()
1919
{
2020
DefaultStyleKey = typeof(ImageEx);
21+
DefaultStyleResourceUri = new System.Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
2122
}
2223
}
2324
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public partial class InAppNotification : ContentControl
3535
public InAppNotification()
3636
{
3737
DefaultStyleKey = typeof(InAppNotification);
38+
DefaultStyleResourceUri = new Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
3839

3940
_dispatcherQueue = DispatcherQueue.GetForCurrentThread();
4041
_dismissTimer = _dispatcherQueue.CreateTimer();

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public partial class Loading : ContentControl
2323
public Loading()
2424
{
2525
DefaultStyleKey = typeof(Loading);
26+
DefaultStyleResourceUri = new Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
2627
}
2728

2829
/// <inheritdoc/>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public partial class Menu : ItemsControl
2424
public Menu()
2525
{
2626
DefaultStyleKey = typeof(Menu);
27+
DefaultStyleResourceUri = new Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
2728
}
2829

2930
// even if we have multiple menus in the same page we need only one cache because only one menu item will have certain short cut.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public sealed class MetadataControl : Control
6565
public MetadataControl()
6666
{
6767
DefaultStyleKey = typeof(MetadataControl);
68+
DefaultStyleResourceUri = new System.Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
6869
ActualThemeChanged += OnActualThemeChanged;
6970
}
7071

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ public Brush Outline
119119
public RadialProgressBar()
120120
{
121121
DefaultStyleKey = typeof(RadialProgressBar);
122+
DefaultStyleResourceUri = new Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
122123
SizeChanged += SizeChangedHandler;
123124
}
124125

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public partial class RotatorTile : Control
8484
public RotatorTile()
8585
{
8686
DefaultStyleKey = typeof(RotatorTile);
87+
DefaultStyleResourceUri = new Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
8788

8889
Unloaded += RotatorTile_Unloaded;
8990
Loaded += RotatorTile_Loaded;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class TabbedCommandBar : NavigationView
3838
public TabbedCommandBar()
3939
{
4040
DefaultStyleKey = typeof(TabbedCommandBar);
41-
DefaultStyleResourceUri = new System.Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
41+
DefaultStyleResourceUri = new Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
4242

4343
SelectionChanged += SelectedItemChanged;
4444
Loaded += TabbedCommandBar_Loaded;

0 commit comments

Comments
 (0)