mirror of
https://github.com/AtomUI/AtomUI.git
synced 2026-10-28 06:07:28 +08:00
Refactor Gallery Controls register method
This commit is contained in:
@@ -2,15 +2,4 @@
|
||||
x:Class="AtomUIGallery.BaseGalleryApplication"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Application.Styles>
|
||||
<Styles>
|
||||
<Styles.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="Controls/Controls.axaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Styles.Resources>
|
||||
</Styles>
|
||||
</Application.Styles>
|
||||
</Application>
|
||||
@@ -1,11 +0,0 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="ShowCaseItem.axaml" />
|
||||
<ResourceInclude Source="ShowCasePanel.axaml" />
|
||||
<ResourceInclude Source="ColorItemControl.axaml" />
|
||||
<ResourceInclude Source="ColorListControl.axaml" />
|
||||
<ResourceInclude Source="IconGallery.axaml" />
|
||||
<ResourceInclude Source="IconInfoItem.axaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,14 @@
|
||||
<atom:ControlThemesProvider xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:atom="https://atomui.net"
|
||||
x:Class="AtomUIGallery.Controls.GalleryControlThemesProvider"
|
||||
Id="AtomUIGallery.Controls">
|
||||
<atom:ControlThemesProvider.ControlThemes>
|
||||
<ResourceInclude Source="ShowCaseItem.axaml" />
|
||||
<ResourceInclude Source="ShowCasePanel.axaml" />
|
||||
<ResourceInclude Source="ColorItemControl.axaml" />
|
||||
<ResourceInclude Source="ColorListControl.axaml" />
|
||||
<ResourceInclude Source="IconGallery.axaml" />
|
||||
<ResourceInclude Source="IconInfoItem.axaml" />
|
||||
</atom:ControlThemesProvider.ControlThemes>
|
||||
</atom:ControlThemesProvider>
|
||||
@@ -0,0 +1,7 @@
|
||||
using AtomUI.Theme;
|
||||
|
||||
namespace AtomUIGallery.Controls;
|
||||
|
||||
internal class GalleryControlThemesProvider : ControlThemesProvider
|
||||
{
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using AtomUI.Theme;
|
||||
using AtomUI.Theme.Language;
|
||||
using AtomUIGallery.Controls;
|
||||
|
||||
namespace AtomUIGallery;
|
||||
|
||||
@@ -7,6 +8,7 @@ public static class ThemeManagerBuilderExtensions
|
||||
{
|
||||
public static IThemeManagerBuilder UseGalleryControls(this IThemeManagerBuilder themeManagerBuilder)
|
||||
{
|
||||
themeManagerBuilder.AddControlThemesProvider(new GalleryControlThemesProvider());
|
||||
var languageProviders = LanguageProviderPool.GetLanguageProviders();
|
||||
foreach (var languageProvider in languageProviders)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using AtomUI.Theme;
|
||||
|
||||
namespace AtomUI.Desktop.Controls;
|
||||
namespace AtomUIGallery.Controls;
|
||||
|
||||
internal class DesktopControlThemesProvider : ControlThemesProvider
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@ using AtomUI.Controls;
|
||||
using AtomUI.MotionScene;
|
||||
using AtomUI.Theme;
|
||||
using AtomUI.Theme.Language;
|
||||
using AtomUIGallery.Controls;
|
||||
using Avalonia;
|
||||
using Avalonia.Animation;
|
||||
using Avalonia.Media.Transformation;
|
||||
|
||||
Reference in New Issue
Block a user