Fix for DefaultStyleKey not working always when assembly name differs from namespace.
This commit is contained in:
Родитель
02a4d2bc3e
Коммит
323e006837
|
@ -77,6 +77,7 @@ namespace CommunityToolkit.WinUI.UI.Controls
|
||||||
public CameraPreview()
|
public CameraPreview()
|
||||||
{
|
{
|
||||||
this.DefaultStyleKey = typeof(CameraPreview);
|
this.DefaultStyleKey = typeof(CameraPreview);
|
||||||
|
this.DefaultStyleResourceUri = new Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
|
|
|
@ -33,6 +33,7 @@ namespace CommunityToolkit.WinUI.UI.Controls
|
||||||
public DropShadowPanel()
|
public DropShadowPanel()
|
||||||
{
|
{
|
||||||
this.DefaultStyleKey = typeof(DropShadowPanel);
|
this.DefaultStyleKey = typeof(DropShadowPanel);
|
||||||
|
this.DefaultStyleResourceUri = new Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
|
||||||
|
|
||||||
if (!DesignTimeHelpers.IsRunningInLegacyDesignerMode)
|
if (!DesignTimeHelpers.IsRunningInLegacyDesignerMode)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,6 +18,7 @@ namespace CommunityToolkit.WinUI.UI.Controls
|
||||||
: base()
|
: base()
|
||||||
{
|
{
|
||||||
DefaultStyleKey = typeof(ImageEx);
|
DefaultStyleKey = typeof(ImageEx);
|
||||||
|
DefaultStyleResourceUri = new System.Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -35,6 +35,7 @@ namespace CommunityToolkit.WinUI.UI.Controls
|
||||||
public InAppNotification()
|
public InAppNotification()
|
||||||
{
|
{
|
||||||
DefaultStyleKey = typeof(InAppNotification);
|
DefaultStyleKey = typeof(InAppNotification);
|
||||||
|
DefaultStyleResourceUri = new Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
|
||||||
|
|
||||||
_dispatcherQueue = DispatcherQueue.GetForCurrentThread();
|
_dispatcherQueue = DispatcherQueue.GetForCurrentThread();
|
||||||
_dismissTimer = _dispatcherQueue.CreateTimer();
|
_dismissTimer = _dispatcherQueue.CreateTimer();
|
||||||
|
|
|
@ -23,6 +23,7 @@ namespace CommunityToolkit.WinUI.UI.Controls
|
||||||
public Loading()
|
public Loading()
|
||||||
{
|
{
|
||||||
DefaultStyleKey = typeof(Loading);
|
DefaultStyleKey = typeof(Loading);
|
||||||
|
DefaultStyleResourceUri = new Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
|
|
|
@ -24,6 +24,7 @@ namespace CommunityToolkit.WinUI.UI.Controls
|
||||||
public Menu()
|
public Menu()
|
||||||
{
|
{
|
||||||
DefaultStyleKey = typeof(Menu);
|
DefaultStyleKey = typeof(Menu);
|
||||||
|
DefaultStyleResourceUri = new Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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.
|
// 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.
|
||||||
|
|
|
@ -65,6 +65,7 @@ namespace CommunityToolkit.WinUI.UI.Controls
|
||||||
public MetadataControl()
|
public MetadataControl()
|
||||||
{
|
{
|
||||||
DefaultStyleKey = typeof(MetadataControl);
|
DefaultStyleKey = typeof(MetadataControl);
|
||||||
|
DefaultStyleResourceUri = new System.Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
|
||||||
ActualThemeChanged += OnActualThemeChanged;
|
ActualThemeChanged += OnActualThemeChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,6 +119,7 @@ namespace CommunityToolkit.WinUI.UI.Controls
|
||||||
public RadialProgressBar()
|
public RadialProgressBar()
|
||||||
{
|
{
|
||||||
DefaultStyleKey = typeof(RadialProgressBar);
|
DefaultStyleKey = typeof(RadialProgressBar);
|
||||||
|
DefaultStyleResourceUri = new Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
|
||||||
SizeChanged += SizeChangedHandler;
|
SizeChanged += SizeChangedHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,6 +84,7 @@ namespace CommunityToolkit.WinUI.UI.Controls
|
||||||
public RotatorTile()
|
public RotatorTile()
|
||||||
{
|
{
|
||||||
DefaultStyleKey = typeof(RotatorTile);
|
DefaultStyleKey = typeof(RotatorTile);
|
||||||
|
DefaultStyleResourceUri = new Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
|
||||||
|
|
||||||
Unloaded += RotatorTile_Unloaded;
|
Unloaded += RotatorTile_Unloaded;
|
||||||
Loaded += RotatorTile_Loaded;
|
Loaded += RotatorTile_Loaded;
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace CommunityToolkit.WinUI.UI.Controls
|
||||||
public TabbedCommandBar()
|
public TabbedCommandBar()
|
||||||
{
|
{
|
||||||
DefaultStyleKey = typeof(TabbedCommandBar);
|
DefaultStyleKey = typeof(TabbedCommandBar);
|
||||||
DefaultStyleResourceUri = new System.Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
|
DefaultStyleResourceUri = new Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
|
||||||
|
|
||||||
SelectionChanged += SelectedItemChanged;
|
SelectionChanged += SelectedItemChanged;
|
||||||
Loaded += TabbedCommandBar_Loaded;
|
Loaded += TabbedCommandBar_Loaded;
|
||||||
|
|
|
@ -23,6 +23,7 @@ namespace CommunityToolkit.WinUI.UI.Controls
|
||||||
public TabbedCommandBarItem()
|
public TabbedCommandBarItem()
|
||||||
{
|
{
|
||||||
DefaultStyleKey = typeof(TabbedCommandBarItem);
|
DefaultStyleKey = typeof(TabbedCommandBarItem);
|
||||||
|
DefaultStyleResourceUri = new System.Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -30,6 +30,7 @@ namespace CommunityToolkit.WinUI.UI.Controls
|
||||||
public TextToolbar()
|
public TextToolbar()
|
||||||
{
|
{
|
||||||
DefaultStyleKey = typeof(TextToolbar);
|
DefaultStyleKey = typeof(TextToolbar);
|
||||||
|
DefaultStyleResourceUri = new Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
|
||||||
|
|
||||||
CustomButtons = new ButtonMap();
|
CustomButtons = new ButtonMap();
|
||||||
ButtonModifications = new DefaultButtonModificationList();
|
ButtonModifications = new DefaultButtonModificationList();
|
||||||
|
|
|
@ -66,6 +66,7 @@ namespace CommunityToolkit.WinUI.UI.Controls
|
||||||
public TileControl()
|
public TileControl()
|
||||||
{
|
{
|
||||||
DefaultStyleKey = typeof(TileControl);
|
DefaultStyleKey = typeof(TileControl);
|
||||||
|
DefaultStyleResourceUri = new Uri("ms-appx:///CommunityToolkit.WinUI.UI.Controls.Core/Themes/Generic.xaml");
|
||||||
|
|
||||||
InitializeAnimation();
|
InitializeAnimation();
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче