diff --git a/Samples/AtomUI.Demo.Desktop/Program.cs b/Samples/AtomUI.Demo.Desktop/Program.cs
index 7281d25..0ceab16 100644
--- a/Samples/AtomUI.Demo.Desktop/Program.cs
+++ b/Samples/AtomUI.Demo.Desktop/Program.cs
@@ -1,5 +1,6 @@
using AtomUI.Icon;
using AtomUI.Icon.AntDesign;
+using AtomUI.Theme;
using Avalonia;
using Avalonia.Dialogs;
using Avalonia.Media;
diff --git a/Samples/AtomUI.Demo.Desktop/ViewModels/PaletteDemoViewModel.cs b/Samples/AtomUI.Demo.Desktop/ViewModels/PaletteDemoViewModel.cs
index cda22b3..6763292 100644
--- a/Samples/AtomUI.Demo.Desktop/ViewModels/PaletteDemoViewModel.cs
+++ b/Samples/AtomUI.Demo.Desktop/ViewModels/PaletteDemoViewModel.cs
@@ -1,5 +1,5 @@
using System.Collections.ObjectModel;
-using AtomUI.Palette;
+using AtomUI.Theme.Palette;
using Avalonia.Media;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Messaging;
diff --git a/src/AtomUI.Base/Media/BoxShadowExtensions.cs b/src/AtomUI.Base/Media/BoxShadowExtensions.cs
index 464ee0b..e4f7566 100644
--- a/src/AtomUI.Base/Media/BoxShadowExtensions.cs
+++ b/src/AtomUI.Base/Media/BoxShadowExtensions.cs
@@ -1,6 +1,5 @@
using Avalonia;
using Avalonia.Media;
-using Math = System.Math;
namespace AtomUI.Media;
diff --git a/src/AtomUI.Base/Media/PixelPointTransition.cs b/src/AtomUI.Base/Media/PixelPointTransition.cs
index 0ddd310..4730c60 100644
--- a/src/AtomUI.Base/Media/PixelPointTransition.cs
+++ b/src/AtomUI.Base/Media/PixelPointTransition.cs
@@ -1,5 +1,4 @@
-using AtomUI.Utils;
-using Avalonia;
+using Avalonia;
using Avalonia.Animation;
namespace AtomUI.Media;
diff --git a/src/AtomUI.Base/MotionScene/MoveMotion.cs b/src/AtomUI.Base/MotionScene/MoveMotion.cs
index b09df83..4ffa39a 100644
--- a/src/AtomUI.Base/MotionScene/MoveMotion.cs
+++ b/src/AtomUI.Base/MotionScene/MoveMotion.cs
@@ -1,8 +1,6 @@
using Avalonia;
using Avalonia.Animation.Easings;
using Avalonia.Controls;
-using Avalonia.Media;
-using Avalonia.Media.Transformation;
namespace AtomUI.MotionScene;
diff --git a/src/AtomUI.Base/Reflection/TypeExtension.cs b/src/AtomUI.Base/Reflection/TypeExtension.cs
index 44b674b..161dc96 100644
--- a/src/AtomUI.Base/Reflection/TypeExtension.cs
+++ b/src/AtomUI.Base/Reflection/TypeExtension.cs
@@ -1,6 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
-using Avalonia.Controls;
namespace AtomUI.Reflection;
diff --git a/src/AtomUI.Controls/Alert/Alert.cs b/src/AtomUI.Controls/Alert/Alert.cs
index b5a688d..2a73012 100644
--- a/src/AtomUI.Controls/Alert/Alert.cs
+++ b/src/AtomUI.Controls/Alert/Alert.cs
@@ -1,5 +1,5 @@
-using AtomUI.Data;
-using AtomUI.Styling;
+using AtomUI.Theme.Data;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Controls;
diff --git a/src/AtomUI.Controls/Alert/AlertTheme.cs b/src/AtomUI.Controls/Alert/AlertTheme.cs
index 7337f1b..777a3a1 100644
--- a/src/AtomUI.Controls/Alert/AlertTheme.cs
+++ b/src/AtomUI.Controls/Alert/AlertTheme.cs
@@ -1,5 +1,6 @@
using AtomUI.Data;
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Controls;
@@ -16,7 +17,7 @@ using VerticalAlignment = Avalonia.Layout.VerticalAlignment;
namespace AtomUI.Controls;
[ControlThemeProvider]
-internal class AlertTheme : ControlTheme
+internal class AlertTheme : BaseControlTheme
{
public const string CloseBtnPart = "PART_CloseBtn";
public const string InfoIconPart = "PART_InfoIcon";
diff --git a/src/AtomUI.Controls/Alert/AlertToken.cs b/src/AtomUI.Controls/Alert/AlertToken.cs
index beabb19..bb9b0f0 100644
--- a/src/AtomUI.Controls/Alert/AlertToken.cs
+++ b/src/AtomUI.Controls/Alert/AlertToken.cs
@@ -1,4 +1,4 @@
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
using Avalonia;
namespace AtomUI.Controls;
diff --git a/src/AtomUI.Controls/ArrowDecoratedBox/ArrowDecoratedBox.cs b/src/AtomUI.Controls/ArrowDecoratedBox/ArrowDecoratedBox.cs
index 02547ce..7f938fb 100644
--- a/src/AtomUI.Controls/ArrowDecoratedBox/ArrowDecoratedBox.cs
+++ b/src/AtomUI.Controls/ArrowDecoratedBox/ArrowDecoratedBox.cs
@@ -1,5 +1,5 @@
using AtomUI.Media;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Controls;
diff --git a/src/AtomUI.Controls/ArrowDecoratedBox/ArrowDecoratedBoxTheme.cs b/src/AtomUI.Controls/ArrowDecoratedBox/ArrowDecoratedBoxTheme.cs
index 044bd87..88f40fa 100644
--- a/src/AtomUI.Controls/ArrowDecoratedBox/ArrowDecoratedBoxTheme.cs
+++ b/src/AtomUI.Controls/ArrowDecoratedBox/ArrowDecoratedBoxTheme.cs
@@ -1,17 +1,15 @@
using AtomUI.Controls.Utils;
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
-using Avalonia.Media;
using Avalonia.Styling;
-using ExCSS;
-using Colors = Avalonia.Media.Colors;
namespace AtomUI.Controls;
[ControlThemeProvider]
-public class ArrowDecoratedBoxTheme : ControlTheme
+public class ArrowDecoratedBoxTheme : BaseControlTheme
{
public const string DecoratorPart = "Part_Decorator";
diff --git a/src/AtomUI.Controls/ArrowDecoratedBox/ArrowDecoratedBoxToken.cs b/src/AtomUI.Controls/ArrowDecoratedBox/ArrowDecoratedBoxToken.cs
index 200c0fb..df9f3f7 100644
--- a/src/AtomUI.Controls/ArrowDecoratedBox/ArrowDecoratedBoxToken.cs
+++ b/src/AtomUI.Controls/ArrowDecoratedBox/ArrowDecoratedBoxToken.cs
@@ -1,4 +1,4 @@
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
using Avalonia;
namespace AtomUI.Controls;
diff --git a/src/AtomUI.Controls/Badge/BadgeToken.cs b/src/AtomUI.Controls/Badge/BadgeToken.cs
index a94d540..e128c81 100644
--- a/src/AtomUI.Controls/Badge/BadgeToken.cs
+++ b/src/AtomUI.Controls/Badge/BadgeToken.cs
@@ -1,4 +1,4 @@
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
using Avalonia;
using Avalonia.Media;
diff --git a/src/AtomUI.Controls/Badge/CountBadge.cs b/src/AtomUI.Controls/Badge/CountBadge.cs
index 6b3449d..26134d9 100644
--- a/src/AtomUI.Controls/Badge/CountBadge.cs
+++ b/src/AtomUI.Controls/Badge/CountBadge.cs
@@ -2,8 +2,8 @@
using AtomUI.Controls.MotionScene;
using AtomUI.Data;
using AtomUI.MotionScene;
-using AtomUI.Palette;
-using AtomUI.Styling;
+using AtomUI.Theme.Palette;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Controls;
diff --git a/src/AtomUI.Controls/Badge/CountBadgeAdorner.cs b/src/AtomUI.Controls/Badge/CountBadgeAdorner.cs
index 6afaeb4..91589df 100644
--- a/src/AtomUI.Controls/Badge/CountBadgeAdorner.cs
+++ b/src/AtomUI.Controls/Badge/CountBadgeAdorner.cs
@@ -1,6 +1,6 @@
using System.Globalization;
using AtomUI.Media;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Documents;
diff --git a/src/AtomUI.Controls/Badge/DotBadge.cs b/src/AtomUI.Controls/Badge/DotBadge.cs
index 4f68423..9159b76 100644
--- a/src/AtomUI.Controls/Badge/DotBadge.cs
+++ b/src/AtomUI.Controls/Badge/DotBadge.cs
@@ -2,8 +2,8 @@
using AtomUI.Controls.MotionScene;
using AtomUI.Data;
using AtomUI.MotionScene;
-using AtomUI.Palette;
-using AtomUI.Styling;
+using AtomUI.Theme.Palette;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Controls;
diff --git a/src/AtomUI.Controls/Badge/DotBadgeAdorner.cs b/src/AtomUI.Controls/Badge/DotBadgeAdorner.cs
index 67cf610..a63fd91 100644
--- a/src/AtomUI.Controls/Badge/DotBadgeAdorner.cs
+++ b/src/AtomUI.Controls/Badge/DotBadgeAdorner.cs
@@ -1,4 +1,4 @@
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Layout;
diff --git a/src/AtomUI.Controls/Badge/RibbonBadge.cs b/src/AtomUI.Controls/Badge/RibbonBadge.cs
index f92db08..b924e6b 100644
--- a/src/AtomUI.Controls/Badge/RibbonBadge.cs
+++ b/src/AtomUI.Controls/Badge/RibbonBadge.cs
@@ -1,6 +1,6 @@
using AtomUI.Data;
-using AtomUI.Palette;
-using AtomUI.Styling;
+using AtomUI.Theme.Palette;
+using AtomUI.Theme.Styling;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
diff --git a/src/AtomUI.Controls/Badge/RibbonBadgeAdorner.cs b/src/AtomUI.Controls/Badge/RibbonBadgeAdorner.cs
index c1b573b..f40796d 100644
--- a/src/AtomUI.Controls/Badge/RibbonBadgeAdorner.cs
+++ b/src/AtomUI.Controls/Badge/RibbonBadgeAdorner.cs
@@ -1,6 +1,6 @@
using AtomUI.Controls.Utils;
using AtomUI.Media;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Layout;
diff --git a/src/AtomUI.Controls/Buttons/BaseButtonTheme.cs b/src/AtomUI.Controls/Buttons/BaseButtonTheme.cs
index caf1839..8afdf57 100644
--- a/src/AtomUI.Controls/Buttons/BaseButtonTheme.cs
+++ b/src/AtomUI.Controls/Buttons/BaseButtonTheme.cs
@@ -1,8 +1,8 @@
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
-using Avalonia.Data;
using Avalonia.Input;
using Avalonia.Layout;
using Avalonia.Markup.Xaml.MarkupExtensions;
@@ -10,7 +10,7 @@ using Avalonia.Styling;
namespace AtomUI.Controls;
-internal abstract class BaseButtonTheme : ControlTheme
+internal abstract class BaseButtonTheme : BaseControlTheme
{
public const string LabelPart = "PART_Label";
public const string StackPanelPart = "PART_StackPanel";
diff --git a/src/AtomUI.Controls/Buttons/Button.cs b/src/AtomUI.Controls/Buttons/Button.cs
index 0c40f66..68fa78b 100644
--- a/src/AtomUI.Controls/Buttons/Button.cs
+++ b/src/AtomUI.Controls/Buttons/Button.cs
@@ -1,7 +1,8 @@
using AtomUI.Controls.Utils;
using AtomUI.Icon;
using AtomUI.Media;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
+using AtomUI.Theme.Utils;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Animation;
diff --git a/src/AtomUI.Controls/Buttons/ButtonToken.cs b/src/AtomUI.Controls/Buttons/ButtonToken.cs
index 6b953c9..bd17fbe 100644
--- a/src/AtomUI.Controls/Buttons/ButtonToken.cs
+++ b/src/AtomUI.Controls/Buttons/ButtonToken.cs
@@ -1,5 +1,5 @@
-using AtomUI.Styling;
-using AtomUI.TokenSystem;
+using AtomUI.Theme.Styling;
+using AtomUI.Theme.TokenSystem;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Media;
diff --git a/src/AtomUI.Controls/Buttons/DefaultButtonTheme.cs b/src/AtomUI.Controls/Buttons/DefaultButtonTheme.cs
index 29698f7..973bcfa 100644
--- a/src/AtomUI.Controls/Buttons/DefaultButtonTheme.cs
+++ b/src/AtomUI.Controls/Buttons/DefaultButtonTheme.cs
@@ -1,4 +1,4 @@
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using Avalonia.Markup.Xaml.MarkupExtensions;
using Avalonia.Styling;
diff --git a/src/AtomUI.Controls/Buttons/IconButton.cs b/src/AtomUI.Controls/Buttons/IconButton.cs
index 3248e4e..5dd2754 100644
--- a/src/AtomUI.Controls/Buttons/IconButton.cs
+++ b/src/AtomUI.Controls/Buttons/IconButton.cs
@@ -1,5 +1,5 @@
using AtomUI.Icon;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using Avalonia;
using Avalonia.Input;
using Avalonia.LogicalTree;
diff --git a/src/AtomUI.Controls/Buttons/LinkButtonTheme.cs b/src/AtomUI.Controls/Buttons/LinkButtonTheme.cs
index e8d7914..8d629a0 100644
--- a/src/AtomUI.Controls/Buttons/LinkButtonTheme.cs
+++ b/src/AtomUI.Controls/Buttons/LinkButtonTheme.cs
@@ -1,4 +1,4 @@
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using Avalonia.Markup.Xaml.MarkupExtensions;
using Avalonia.Styling;
diff --git a/src/AtomUI.Controls/Buttons/PrimaryButtonTheme.cs b/src/AtomUI.Controls/Buttons/PrimaryButtonTheme.cs
index e87fe40..da810f1 100644
--- a/src/AtomUI.Controls/Buttons/PrimaryButtonTheme.cs
+++ b/src/AtomUI.Controls/Buttons/PrimaryButtonTheme.cs
@@ -1,4 +1,4 @@
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using Avalonia.Markup.Xaml.MarkupExtensions;
using Avalonia.Media;
using Avalonia.Styling;
diff --git a/src/AtomUI.Controls/Buttons/TextButtonTheme.cs b/src/AtomUI.Controls/Buttons/TextButtonTheme.cs
index 42d8dd6..6192ec1 100644
--- a/src/AtomUI.Controls/Buttons/TextButtonTheme.cs
+++ b/src/AtomUI.Controls/Buttons/TextButtonTheme.cs
@@ -1,4 +1,4 @@
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using Avalonia.Markup.Xaml.MarkupExtensions;
using Avalonia.Styling;
diff --git a/src/AtomUI.Controls/CheckBox/CheckBox.cs b/src/AtomUI.Controls/CheckBox/CheckBox.cs
index b9ed566..113a94b 100644
--- a/src/AtomUI.Controls/CheckBox/CheckBox.cs
+++ b/src/AtomUI.Controls/CheckBox/CheckBox.cs
@@ -1,7 +1,7 @@
using AtomUI.Controls.Utils;
using AtomUI.Media;
-using AtomUI.Styling;
-using AtomUI.Utils;
+using AtomUI.Theme.Styling;
+using AtomUI.Theme.Utils;
using Avalonia;
using Avalonia.Animation;
using Avalonia.Animation.Easings;
diff --git a/src/AtomUI.Controls/CheckBox/CheckBoxTheme.cs b/src/AtomUI.Controls/CheckBox/CheckBoxTheme.cs
index 7df1254..67d14cd 100644
--- a/src/AtomUI.Controls/CheckBox/CheckBoxTheme.cs
+++ b/src/AtomUI.Controls/CheckBox/CheckBoxTheme.cs
@@ -1,11 +1,11 @@
-using AtomUI.Styling;
-using Avalonia.Markup.Xaml.MarkupExtensions;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using Avalonia.Styling;
namespace AtomUI.Controls;
[ControlThemeProvider]
-internal class CheckBoxTheme : ControlTheme
+internal class CheckBoxTheme : BaseControlTheme
{
public CheckBoxTheme()
: base(typeof(CheckBox))
diff --git a/src/AtomUI.Controls/CheckBox/CheckBoxToken.cs b/src/AtomUI.Controls/CheckBox/CheckBoxToken.cs
index ff83028..441e1db 100644
--- a/src/AtomUI.Controls/CheckBox/CheckBoxToken.cs
+++ b/src/AtomUI.Controls/CheckBox/CheckBoxToken.cs
@@ -1,4 +1,4 @@
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
namespace AtomUI.Controls;
diff --git a/src/AtomUI.Controls/EmptyIndicator/EmptyIndicator.cs b/src/AtomUI.Controls/EmptyIndicator/EmptyIndicator.cs
index 901c6ea..7056076 100644
--- a/src/AtomUI.Controls/EmptyIndicator/EmptyIndicator.cs
+++ b/src/AtomUI.Controls/EmptyIndicator/EmptyIndicator.cs
@@ -1,5 +1,5 @@
using AtomUI.Media;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Controls;
diff --git a/src/AtomUI.Controls/EmptyIndicator/EmptyIndicatorTheme.cs b/src/AtomUI.Controls/EmptyIndicator/EmptyIndicatorTheme.cs
index ef3a6e9..8f3560e 100644
--- a/src/AtomUI.Controls/EmptyIndicator/EmptyIndicatorTheme.cs
+++ b/src/AtomUI.Controls/EmptyIndicator/EmptyIndicatorTheme.cs
@@ -1,5 +1,6 @@
using AtomUI.Data;
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Controls;
@@ -12,7 +13,7 @@ using Avalonia.Styling;
namespace AtomUI.Controls;
[ControlThemeProvider]
-internal class EmptyIndicatorTheme : ControlTheme
+internal class EmptyIndicatorTheme : BaseControlTheme
{
public const string SvgImagePart = "PART_SvgImage";
diff --git a/src/AtomUI.Controls/EmptyIndicator/EmptyIndicatorToken.cs b/src/AtomUI.Controls/EmptyIndicator/EmptyIndicatorToken.cs
index dfd8ff7..4ed4c48 100644
--- a/src/AtomUI.Controls/EmptyIndicator/EmptyIndicatorToken.cs
+++ b/src/AtomUI.Controls/EmptyIndicator/EmptyIndicatorToken.cs
@@ -1,4 +1,4 @@
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
namespace AtomUI.Controls;
diff --git a/src/AtomUI.Controls/Flyouts/Flyout.cs b/src/AtomUI.Controls/Flyouts/Flyout.cs
index ffb832e..8626290 100644
--- a/src/AtomUI.Controls/Flyouts/Flyout.cs
+++ b/src/AtomUI.Controls/Flyouts/Flyout.cs
@@ -1,7 +1,7 @@
using System.ComponentModel;
using System.Reactive.Disposables;
using AtomUI.Data;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Controls;
@@ -9,6 +9,7 @@ using Avalonia.Controls.Primitives.PopupPositioning;
using Avalonia.Layout;
using Avalonia.Media;
using Avalonia.Metadata;
+using Avalonia.Styling;
using Avalonia.Threading;
namespace AtomUI.Controls;
diff --git a/src/AtomUI.Controls/Flyouts/FlyoutHost.cs b/src/AtomUI.Controls/Flyouts/FlyoutHost.cs
index 7a01080..b3376b2 100644
--- a/src/AtomUI.Controls/Flyouts/FlyoutHost.cs
+++ b/src/AtomUI.Controls/Flyouts/FlyoutHost.cs
@@ -1,6 +1,6 @@
using System.Reactive.Disposables;
using AtomUI.Data;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Controls;
diff --git a/src/AtomUI.Controls/Flyouts/FlyoutPresenterToken.cs b/src/AtomUI.Controls/Flyouts/FlyoutPresenterToken.cs
index 512e7d1..0e83d50 100644
--- a/src/AtomUI.Controls/Flyouts/FlyoutPresenterToken.cs
+++ b/src/AtomUI.Controls/Flyouts/FlyoutPresenterToken.cs
@@ -1,4 +1,4 @@
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
namespace AtomUI.Controls;
diff --git a/src/AtomUI.Controls/Flyouts/MenuFlyout.cs b/src/AtomUI.Controls/Flyouts/MenuFlyout.cs
index 39e1262..606f003 100644
--- a/src/AtomUI.Controls/Flyouts/MenuFlyout.cs
+++ b/src/AtomUI.Controls/Flyouts/MenuFlyout.cs
@@ -5,11 +5,10 @@ using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using Avalonia.Metadata;
+using Avalonia.Styling;
namespace AtomUI.Controls;
-using AvaloniaControlTheme = Avalonia.Styling.ControlTheme;
-
public class MenuFlyout : PopupFlyoutBase
{
private static readonly MethodInfo SetItemsSourceMethodInfo;
@@ -41,7 +40,7 @@ public class MenuFlyout : PopupFlyoutBase
///
/// Defines the property.
///
- public static readonly StyledProperty ItemContainerThemeProperty =
+ public static readonly StyledProperty ItemContainerThemeProperty =
ItemsControl.ItemContainerThemeProperty.AddOwner();
///
@@ -75,7 +74,7 @@ public class MenuFlyout : PopupFlyoutBase
///
/// Gets or sets the that is applied to the container element generated for each item.
///
- public AvaloniaControlTheme? ItemContainerTheme
+ public ControlTheme? ItemContainerTheme
{
get => GetValue(ItemContainerThemeProperty);
set => SetValue(ItemContainerThemeProperty, value);
@@ -84,7 +83,7 @@ public class MenuFlyout : PopupFlyoutBase
///
/// Gets or sets the that is applied to the container element generated for the flyout presenter.
///
- public AvaloniaControlTheme? FlyoutPresenterTheme
+ public ControlTheme? FlyoutPresenterTheme
{
get => GetValue(FlyoutPresenterThemeProperty);
set => SetValue(FlyoutPresenterThemeProperty, value);
diff --git a/src/AtomUI.Controls/Flyouts/MenuFlyoutPresenterTheme.cs b/src/AtomUI.Controls/Flyouts/MenuFlyoutPresenterTheme.cs
index bfe3062..ac23c16 100644
--- a/src/AtomUI.Controls/Flyouts/MenuFlyoutPresenterTheme.cs
+++ b/src/AtomUI.Controls/Flyouts/MenuFlyoutPresenterTheme.cs
@@ -1,4 +1,5 @@
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia.Controls;
using Avalonia.Controls.Presenters;
@@ -9,7 +10,7 @@ using Avalonia.Media;
namespace AtomUI.Controls;
[ControlThemeProvider]
-public class MenuFlyoutPresenterTheme : ControlTheme
+public class MenuFlyoutPresenterTheme : BaseControlTheme
{
public const string ItemsPresenterPart = "PART_ItemsPresenter";
public const string RootContainerPart = "PART_RootContainer";
diff --git a/src/AtomUI.Controls/GeneratedFiles/AtomUI.Generator/AtomUI.Generator.TokenResourceKeyGenerator/TokenResourceConst.g.cs b/src/AtomUI.Controls/GeneratedFiles/AtomUI.Generator/AtomUI.Generator.TokenResourceKeyGenerator/TokenResourceConst.g.cs
index b946197..097a0e8 100644
--- a/src/AtomUI.Controls/GeneratedFiles/AtomUI.Generator/AtomUI.Generator.TokenResourceKeyGenerator/TokenResourceConst.g.cs
+++ b/src/AtomUI.Controls/GeneratedFiles/AtomUI.Generator/AtomUI.Generator.TokenResourceKeyGenerator/TokenResourceConst.g.cs
@@ -1,6 +1,6 @@
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
-namespace AtomUI.Styling
+namespace AtomUI.Theme.Styling
{
public static class AlertResourceKey
{
diff --git a/src/AtomUI.Controls/Loading/LoadingIndicator.cs b/src/AtomUI.Controls/Loading/LoadingIndicator.cs
index 46eab3e..31fe955 100644
--- a/src/AtomUI.Controls/Loading/LoadingIndicator.cs
+++ b/src/AtomUI.Controls/Loading/LoadingIndicator.cs
@@ -1,5 +1,5 @@
using AtomUI.Controls.Utils;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Animation;
diff --git a/src/AtomUI.Controls/Loading/LoadingIndicatorAdorner.cs b/src/AtomUI.Controls/Loading/LoadingIndicatorAdorner.cs
index aacfb07..f9ae370 100644
--- a/src/AtomUI.Controls/Loading/LoadingIndicatorAdorner.cs
+++ b/src/AtomUI.Controls/Loading/LoadingIndicatorAdorner.cs
@@ -1,4 +1,4 @@
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
diff --git a/src/AtomUI.Controls/Loading/LoadingIndicatorAdornerTheme.cs b/src/AtomUI.Controls/Loading/LoadingIndicatorAdornerTheme.cs
index 6bd45bf..cd2b97b 100644
--- a/src/AtomUI.Controls/Loading/LoadingIndicatorAdornerTheme.cs
+++ b/src/AtomUI.Controls/Loading/LoadingIndicatorAdornerTheme.cs
@@ -1,11 +1,12 @@
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
namespace AtomUI.Controls;
[ControlThemeProvider]
-public class LoadingIndicatorAdornerTheme : ControlTheme
+public class LoadingIndicatorAdornerTheme : BaseControlTheme
{
public const string LoadingIndicatorPart = "Part_LoadingIndicator";
public const string MainContainerPart = "Part_MainContainer";
diff --git a/src/AtomUI.Controls/Loading/LoadingIndicatorTheme.cs b/src/AtomUI.Controls/Loading/LoadingIndicatorTheme.cs
index 6daf42f..88a3a14 100644
--- a/src/AtomUI.Controls/Loading/LoadingIndicatorTheme.cs
+++ b/src/AtomUI.Controls/Loading/LoadingIndicatorTheme.cs
@@ -1,5 +1,6 @@
using AtomUI.Icon;
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using Avalonia.Animation.Easings;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
@@ -9,7 +10,7 @@ using Avalonia.Styling;
namespace AtomUI.Controls;
[ControlThemeProvider]
-public class LoadingIndicatorTheme : ControlTheme
+public class LoadingIndicatorTheme : BaseControlTheme
{
public const string MainContainerPart = "Part_MainContainer";
public const string LoadingTextPart = "Part_LoadingText";
diff --git a/src/AtomUI.Controls/Loading/LoadingIndicatorToken.cs b/src/AtomUI.Controls/Loading/LoadingIndicatorToken.cs
index c2d7200..715dfe6 100644
--- a/src/AtomUI.Controls/Loading/LoadingIndicatorToken.cs
+++ b/src/AtomUI.Controls/Loading/LoadingIndicatorToken.cs
@@ -1,4 +1,4 @@
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
namespace AtomUI.Controls;
diff --git a/src/AtomUI.Controls/Loading/LoadingMaskHost.cs b/src/AtomUI.Controls/Loading/LoadingMaskHost.cs
index 89f5a7e..b3c9dd8 100644
--- a/src/AtomUI.Controls/Loading/LoadingMaskHost.cs
+++ b/src/AtomUI.Controls/Loading/LoadingMaskHost.cs
@@ -1,5 +1,5 @@
using AtomUI.Data;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using Avalonia;
using Avalonia.Animation.Easings;
using Avalonia.Controls;
diff --git a/src/AtomUI.Controls/MarqueeLabel/MarqueeLabel.cs b/src/AtomUI.Controls/MarqueeLabel/MarqueeLabel.cs
index 0bce66f..6f1760a 100644
--- a/src/AtomUI.Controls/MarqueeLabel/MarqueeLabel.cs
+++ b/src/AtomUI.Controls/MarqueeLabel/MarqueeLabel.cs
@@ -1,4 +1,4 @@
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Animation;
diff --git a/src/AtomUI.Controls/MarqueeLabel/MarqueeLabelToken.cs b/src/AtomUI.Controls/MarqueeLabel/MarqueeLabelToken.cs
index 66be98b..b5460b1 100644
--- a/src/AtomUI.Controls/MarqueeLabel/MarqueeLabelToken.cs
+++ b/src/AtomUI.Controls/MarqueeLabel/MarqueeLabelToken.cs
@@ -1,4 +1,4 @@
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
namespace AtomUI.Controls;
diff --git a/src/AtomUI.Controls/Menu/ContextMenu.cs b/src/AtomUI.Controls/Menu/ContextMenu.cs
index 3f2aaaf..b4da42e 100644
--- a/src/AtomUI.Controls/Menu/ContextMenu.cs
+++ b/src/AtomUI.Controls/Menu/ContextMenu.cs
@@ -1,7 +1,7 @@
using System.ComponentModel;
using System.Reflection;
using AtomUI.Reflection;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.Input;
diff --git a/src/AtomUI.Controls/Menu/ContextMenuTheme.cs b/src/AtomUI.Controls/Menu/ContextMenuTheme.cs
index cae97eb..ae9d06f 100644
--- a/src/AtomUI.Controls/Menu/ContextMenuTheme.cs
+++ b/src/AtomUI.Controls/Menu/ContextMenuTheme.cs
@@ -1,4 +1,5 @@
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia.Controls;
using Avalonia.Controls.Presenters;
@@ -9,7 +10,7 @@ using Avalonia.Media;
namespace AtomUI.Controls;
[ControlThemeProvider]
-public class ContextMenuTheme : ControlTheme
+public class ContextMenuTheme : BaseControlTheme
{
public const string ItemsPresenterPart = "PART_ItemsPresenter";
public const string RootContainerPart = "PART_RootContainer";
diff --git a/src/AtomUI.Controls/Menu/MenuItem.cs b/src/AtomUI.Controls/Menu/MenuItem.cs
index 24a2ac0..5b56d63 100644
--- a/src/AtomUI.Controls/Menu/MenuItem.cs
+++ b/src/AtomUI.Controls/Menu/MenuItem.cs
@@ -1,6 +1,7 @@
using AtomUI.Data;
using AtomUI.Media;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
+using AtomUI.Theme.Utils;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Animation;
diff --git a/src/AtomUI.Controls/Menu/MenuItemTheme.cs b/src/AtomUI.Controls/Menu/MenuItemTheme.cs
index 9e06d2a..2cb213a 100644
--- a/src/AtomUI.Controls/Menu/MenuItemTheme.cs
+++ b/src/AtomUI.Controls/Menu/MenuItemTheme.cs
@@ -1,12 +1,13 @@
using AtomUI.Media;
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
+using AtomUI.Theme.Utils;
using AtomUI.Utils;
using Avalonia.Animation;
using Avalonia.Controls;
using Avalonia.Controls.Presenters;
using Avalonia.Controls.Templates;
using Avalonia.Data;
-using Avalonia.Input;
using Avalonia.Layout;
using Avalonia.Media;
using Avalonia.Styling;
@@ -14,7 +15,7 @@ using Avalonia.Styling;
namespace AtomUI.Controls;
[ControlThemeProvider]
-internal class MenuItemTheme : ControlTheme
+internal class MenuItemTheme : BaseControlTheme
{
public const string ItemDecoratorPart = "Part_ItemDecorator";
public const string MainContainerPart = "Part_MainContainer";
diff --git a/src/AtomUI.Controls/Menu/MenuScrollViewer.cs b/src/AtomUI.Controls/Menu/MenuScrollViewer.cs
index f4e8b6d..b6e08f3 100644
--- a/src/AtomUI.Controls/Menu/MenuScrollViewer.cs
+++ b/src/AtomUI.Controls/Menu/MenuScrollViewer.cs
@@ -1,5 +1,5 @@
using System.Globalization;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Converters;
diff --git a/src/AtomUI.Controls/Menu/MenuScrollViewerTheme.cs b/src/AtomUI.Controls/Menu/MenuScrollViewerTheme.cs
index 3601977..299534f 100644
--- a/src/AtomUI.Controls/Menu/MenuScrollViewerTheme.cs
+++ b/src/AtomUI.Controls/Menu/MenuScrollViewerTheme.cs
@@ -1,6 +1,8 @@
using AtomUI.Data;
using AtomUI.Media;
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
+using AtomUI.Theme.Utils;
using AtomUI.Utils;
using Avalonia.Animation;
using Avalonia.Controls;
@@ -13,7 +15,7 @@ using Avalonia.Styling;
namespace AtomUI.Controls;
[ControlThemeProvider]
-internal class MenuScrollViewerTheme : ControlTheme
+internal class MenuScrollViewerTheme : BaseControlTheme
{
public const string ScrollUpButtonPart = "Part_ScrollUpButton";
public const string ScrollDownButtonPart = "Part_ScrollDownButton";
diff --git a/src/AtomUI.Controls/Menu/MenuSeparator.cs b/src/AtomUI.Controls/Menu/MenuSeparator.cs
index 32590cb..f20ccaf 100644
--- a/src/AtomUI.Controls/Menu/MenuSeparator.cs
+++ b/src/AtomUI.Controls/Menu/MenuSeparator.cs
@@ -1,11 +1,8 @@
-using AtomUI.Data;
-using AtomUI.Styling;
+using AtomUI.Theme.Data;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
-using Avalonia.Controls.Primitives;
-using Avalonia.Controls.Templates;
using Avalonia.Data;
-using Avalonia.LogicalTree;
using Avalonia.Media;
namespace AtomUI.Controls;
diff --git a/src/AtomUI.Controls/Menu/MenuSeparatorTheme.cs b/src/AtomUI.Controls/Menu/MenuSeparatorTheme.cs
index 1d2bf6a..6ae4ed6 100644
--- a/src/AtomUI.Controls/Menu/MenuSeparatorTheme.cs
+++ b/src/AtomUI.Controls/Menu/MenuSeparatorTheme.cs
@@ -1,12 +1,11 @@
-using AtomUI.Styling;
-using Avalonia.Controls;
-using Avalonia.Controls.Templates;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using Avalonia.Styling;
namespace AtomUI.Controls;
[ControlThemeProvider]
-public class MenuSeparatorTheme : ControlTheme
+public class MenuSeparatorTheme : BaseControlTheme
{
public MenuSeparatorTheme()
: base(typeof(MenuSeparator))
diff --git a/src/AtomUI.Controls/Menu/MenuTheme.cs b/src/AtomUI.Controls/Menu/MenuTheme.cs
index f740b01..1b069b7 100644
--- a/src/AtomUI.Controls/Menu/MenuTheme.cs
+++ b/src/AtomUI.Controls/Menu/MenuTheme.cs
@@ -1,4 +1,5 @@
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Presenters;
@@ -10,7 +11,7 @@ using Avalonia.Styling;
namespace AtomUI.Controls;
[ControlThemeProvider]
-public class MenuTheme : ControlTheme
+public class MenuTheme : BaseControlTheme
{
public const string ItemsPresenterPart = "PART_ItemsPresenter";
public MenuTheme()
diff --git a/src/AtomUI.Controls/Menu/MenuToken.cs b/src/AtomUI.Controls/Menu/MenuToken.cs
index dee307b..6b062cc 100644
--- a/src/AtomUI.Controls/Menu/MenuToken.cs
+++ b/src/AtomUI.Controls/Menu/MenuToken.cs
@@ -1,5 +1,5 @@
-using AtomUI.Styling;
-using AtomUI.TokenSystem;
+using AtomUI.Theme.Styling;
+using AtomUI.Theme.TokenSystem;
using Avalonia;
using Avalonia.Media;
diff --git a/src/AtomUI.Controls/Menu/TopLevelMenuItemTheme.cs b/src/AtomUI.Controls/Menu/TopLevelMenuItemTheme.cs
index 1096502..3c90abf 100644
--- a/src/AtomUI.Controls/Menu/TopLevelMenuItemTheme.cs
+++ b/src/AtomUI.Controls/Menu/TopLevelMenuItemTheme.cs
@@ -1,4 +1,5 @@
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia.Controls;
using Avalonia.Controls.Presenters;
@@ -11,7 +12,7 @@ using Avalonia.Styling;
namespace AtomUI.Controls;
[ControlThemeProvider]
-public class TopLevelMenuItemTheme : ControlTheme
+public class TopLevelMenuItemTheme : BaseControlTheme
{
public const string ID = "TopLevelMenuItem";
diff --git a/src/AtomUI.Controls/OptionButtonBox/OptionButton.cs b/src/AtomUI.Controls/OptionButtonBox/OptionButton.cs
index 9eff47f..09f5db7 100644
--- a/src/AtomUI.Controls/OptionButtonBox/OptionButton.cs
+++ b/src/AtomUI.Controls/OptionButtonBox/OptionButton.cs
@@ -1,7 +1,7 @@
using AtomUI.Controls.Utils;
using AtomUI.Media;
-using AtomUI.Styling;
-using AtomUI.Utils;
+using AtomUI.Theme.Styling;
+using AtomUI.Theme.Utils;
using Avalonia;
using Avalonia.Animation;
using Avalonia.Controls;
diff --git a/src/AtomUI.Controls/OptionButtonBox/OptionButtonGroup.cs b/src/AtomUI.Controls/OptionButtonBox/OptionButtonGroup.cs
index 7bbc778..dd9ac8f 100644
--- a/src/AtomUI.Controls/OptionButtonBox/OptionButtonGroup.cs
+++ b/src/AtomUI.Controls/OptionButtonBox/OptionButtonGroup.cs
@@ -1,6 +1,6 @@
using System.Collections.Specialized;
using AtomUI.Controls.Utils;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using Avalonia;
using Avalonia.Collections;
using Avalonia.Controls;
diff --git a/src/AtomUI.Controls/OptionButtonBox/OptionButtonGroupTheme.cs b/src/AtomUI.Controls/OptionButtonBox/OptionButtonGroupTheme.cs
index e03864b..20f25ef 100644
--- a/src/AtomUI.Controls/OptionButtonBox/OptionButtonGroupTheme.cs
+++ b/src/AtomUI.Controls/OptionButtonBox/OptionButtonGroupTheme.cs
@@ -1,4 +1,5 @@
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using Avalonia.Layout;
@@ -7,7 +8,7 @@ using Avalonia.Styling;
namespace AtomUI.Controls;
[ControlThemeProvider]
-public class OptionButtonGroupTheme : ControlTheme
+public class OptionButtonGroupTheme : BaseControlTheme
{
public const string MainContainerPart = "PART_MainContainer";
diff --git a/src/AtomUI.Controls/OptionButtonBox/OptionButtonTheme.cs b/src/AtomUI.Controls/OptionButtonBox/OptionButtonTheme.cs
index fff4f1c..182a218 100644
--- a/src/AtomUI.Controls/OptionButtonBox/OptionButtonTheme.cs
+++ b/src/AtomUI.Controls/OptionButtonBox/OptionButtonTheme.cs
@@ -1,4 +1,5 @@
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
@@ -8,7 +9,7 @@ using Avalonia.Styling;
namespace AtomUI.Controls;
[ControlThemeProvider]
-public class OptionButtonTheme : ControlTheme
+public class OptionButtonTheme : BaseControlTheme
{
public OptionButtonTheme()
: base(typeof(OptionButton))
diff --git a/src/AtomUI.Controls/OptionButtonBox/OptionButtonToken.cs b/src/AtomUI.Controls/OptionButtonBox/OptionButtonToken.cs
index d932100..b4e0f84 100644
--- a/src/AtomUI.Controls/OptionButtonBox/OptionButtonToken.cs
+++ b/src/AtomUI.Controls/OptionButtonBox/OptionButtonToken.cs
@@ -1,5 +1,5 @@
-using AtomUI.Styling;
-using AtomUI.TokenSystem;
+using AtomUI.Theme.Styling;
+using AtomUI.Theme.TokenSystem;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Media;
diff --git a/src/AtomUI.Controls/Popup/Popup.cs b/src/AtomUI.Controls/Popup/Popup.cs
index 809a4e5..438eefa 100644
--- a/src/AtomUI.Controls/Popup/Popup.cs
+++ b/src/AtomUI.Controls/Popup/Popup.cs
@@ -2,7 +2,7 @@
using AtomUI.Controls.MotionScene;
using AtomUI.Data;
using AtomUI.MotionScene;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Controls;
diff --git a/src/AtomUI.Controls/ProgressBar/AbstractCircleProgress.cs b/src/AtomUI.Controls/ProgressBar/AbstractCircleProgress.cs
index 4dbd200..3e460cc 100644
--- a/src/AtomUI.Controls/ProgressBar/AbstractCircleProgress.cs
+++ b/src/AtomUI.Controls/ProgressBar/AbstractCircleProgress.cs
@@ -1,5 +1,5 @@
using AtomUI.Media;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Controls;
diff --git a/src/AtomUI.Controls/ProgressBar/AbstractCircleProgressTheme.cs b/src/AtomUI.Controls/ProgressBar/AbstractCircleProgressTheme.cs
index aed79fa..f196414 100644
--- a/src/AtomUI.Controls/ProgressBar/AbstractCircleProgressTheme.cs
+++ b/src/AtomUI.Controls/ProgressBar/AbstractCircleProgressTheme.cs
@@ -1,4 +1,4 @@
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
diff --git a/src/AtomUI.Controls/ProgressBar/AbstractLineProgress.cs b/src/AtomUI.Controls/ProgressBar/AbstractLineProgress.cs
index 0fc2c7f..1a516f7 100644
--- a/src/AtomUI.Controls/ProgressBar/AbstractLineProgress.cs
+++ b/src/AtomUI.Controls/ProgressBar/AbstractLineProgress.cs
@@ -1,5 +1,5 @@
using AtomUI.Media;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Controls;
diff --git a/src/AtomUI.Controls/ProgressBar/AbstractLineProgressTheme.cs b/src/AtomUI.Controls/ProgressBar/AbstractLineProgressTheme.cs
index 3db27e0..60c478e 100644
--- a/src/AtomUI.Controls/ProgressBar/AbstractLineProgressTheme.cs
+++ b/src/AtomUI.Controls/ProgressBar/AbstractLineProgressTheme.cs
@@ -1,4 +1,4 @@
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
diff --git a/src/AtomUI.Controls/ProgressBar/AbstractProgressBar.cs b/src/AtomUI.Controls/ProgressBar/AbstractProgressBar.cs
index c1b30b4..adebbe5 100644
--- a/src/AtomUI.Controls/ProgressBar/AbstractProgressBar.cs
+++ b/src/AtomUI.Controls/ProgressBar/AbstractProgressBar.cs
@@ -1,5 +1,6 @@
using AtomUI.Media;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
+using AtomUI.Theme.Utils;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Animation;
@@ -8,7 +9,6 @@ using Avalonia.Controls;
using Avalonia.Controls.Metadata;
using Avalonia.Controls.Primitives;
using Avalonia.Data;
-using Avalonia.LogicalTree;
using Avalonia.Media;
namespace AtomUI.Controls;
diff --git a/src/AtomUI.Controls/ProgressBar/AbstractProgressBarTheme.cs b/src/AtomUI.Controls/ProgressBar/AbstractProgressBarTheme.cs
index 2e530e2..0f9b7de 100644
--- a/src/AtomUI.Controls/ProgressBar/AbstractProgressBarTheme.cs
+++ b/src/AtomUI.Controls/ProgressBar/AbstractProgressBarTheme.cs
@@ -1,5 +1,6 @@
using AtomUI.Icon;
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
@@ -9,7 +10,7 @@ using Avalonia.Styling;
namespace AtomUI.Controls;
-public class AbstractProgressBarTheme : ControlTheme
+public class AbstractProgressBarTheme : BaseControlTheme
{
public const string PercentageLabelPart = "PART_PercentageLabel";
public const string SuccessCompletedIconPart = "PART_SuccessCompletedIcon";
diff --git a/src/AtomUI.Controls/ProgressBar/CircleProgressTheme.cs b/src/AtomUI.Controls/ProgressBar/CircleProgressTheme.cs
index d4ca16a..f97e2ba 100644
--- a/src/AtomUI.Controls/ProgressBar/CircleProgressTheme.cs
+++ b/src/AtomUI.Controls/ProgressBar/CircleProgressTheme.cs
@@ -1,4 +1,4 @@
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
namespace AtomUI.Controls;
diff --git a/src/AtomUI.Controls/ProgressBar/DashboardProgressTheme.cs b/src/AtomUI.Controls/ProgressBar/DashboardProgressTheme.cs
index 5b01c1f..caab81c 100644
--- a/src/AtomUI.Controls/ProgressBar/DashboardProgressTheme.cs
+++ b/src/AtomUI.Controls/ProgressBar/DashboardProgressTheme.cs
@@ -1,4 +1,4 @@
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
namespace AtomUI.Controls;
diff --git a/src/AtomUI.Controls/ProgressBar/ProgressBar.cs b/src/AtomUI.Controls/ProgressBar/ProgressBar.cs
index 4fd03c2..3d3c2c6 100644
--- a/src/AtomUI.Controls/ProgressBar/ProgressBar.cs
+++ b/src/AtomUI.Controls/ProgressBar/ProgressBar.cs
@@ -1,6 +1,6 @@
-using AtomUI.Data;
using AtomUI.Media;
-using AtomUI.Styling;
+using AtomUI.Theme.Data;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Controls;
diff --git a/src/AtomUI.Controls/ProgressBar/ProgressBarTheme.cs b/src/AtomUI.Controls/ProgressBar/ProgressBarTheme.cs
index 1276ca7..cc902b3 100644
--- a/src/AtomUI.Controls/ProgressBar/ProgressBarTheme.cs
+++ b/src/AtomUI.Controls/ProgressBar/ProgressBarTheme.cs
@@ -1,4 +1,4 @@
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using Avalonia.Controls;
using Avalonia.Layout;
using Avalonia.Media;
diff --git a/src/AtomUI.Controls/ProgressBar/ProgressBarToken.cs b/src/AtomUI.Controls/ProgressBar/ProgressBarToken.cs
index 00ba507..a8dbecf 100644
--- a/src/AtomUI.Controls/ProgressBar/ProgressBarToken.cs
+++ b/src/AtomUI.Controls/ProgressBar/ProgressBarToken.cs
@@ -1,4 +1,4 @@
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
using Avalonia;
using Avalonia.Media;
diff --git a/src/AtomUI.Controls/ProgressBar/StepsProgressBar.cs b/src/AtomUI.Controls/ProgressBar/StepsProgressBar.cs
index 3400faf..57d38f6 100644
--- a/src/AtomUI.Controls/ProgressBar/StepsProgressBar.cs
+++ b/src/AtomUI.Controls/ProgressBar/StepsProgressBar.cs
@@ -1,5 +1,5 @@
-using AtomUI.Data;
-using AtomUI.Styling;
+using AtomUI.Theme.Data;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Controls;
diff --git a/src/AtomUI.Controls/ProgressBar/StepsProgressBarTheme.cs b/src/AtomUI.Controls/ProgressBar/StepsProgressBarTheme.cs
index d3cd78e..d790b0d 100644
--- a/src/AtomUI.Controls/ProgressBar/StepsProgressBarTheme.cs
+++ b/src/AtomUI.Controls/ProgressBar/StepsProgressBarTheme.cs
@@ -1,4 +1,4 @@
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using Avalonia.Layout;
using Avalonia.Styling;
diff --git a/src/AtomUI.Controls/RadioButton/RadioButton.cs b/src/AtomUI.Controls/RadioButton/RadioButton.cs
index 802d666..0fac9e8 100644
--- a/src/AtomUI.Controls/RadioButton/RadioButton.cs
+++ b/src/AtomUI.Controls/RadioButton/RadioButton.cs
@@ -1,7 +1,7 @@
using AtomUI.Controls.Utils;
using AtomUI.Media;
-using AtomUI.Styling;
-using AtomUI.Utils;
+using AtomUI.Theme.Styling;
+using AtomUI.Theme.Utils;
using Avalonia;
using Avalonia.Animation;
using Avalonia.Controls;
diff --git a/src/AtomUI.Controls/RadioButton/RadioButtonTheme.cs b/src/AtomUI.Controls/RadioButton/RadioButtonTheme.cs
index a68a842..0be00a7 100644
--- a/src/AtomUI.Controls/RadioButton/RadioButtonTheme.cs
+++ b/src/AtomUI.Controls/RadioButton/RadioButtonTheme.cs
@@ -1,11 +1,11 @@
-using AtomUI.Styling;
-using Avalonia.Markup.Xaml.MarkupExtensions;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using Avalonia.Styling;
namespace AtomUI.Controls;
[ControlThemeProvider]
-internal class RadioButtonTheme : ControlTheme
+internal class RadioButtonTheme : BaseControlTheme
{
public RadioButtonTheme()
: base(typeof(RadioButton))
diff --git a/src/AtomUI.Controls/RadioButton/RadioButtonToken.cs b/src/AtomUI.Controls/RadioButton/RadioButtonToken.cs
index b2cfe45..e3f40ab 100644
--- a/src/AtomUI.Controls/RadioButton/RadioButtonToken.cs
+++ b/src/AtomUI.Controls/RadioButton/RadioButtonToken.cs
@@ -1,4 +1,4 @@
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
using Avalonia.Media;
namespace AtomUI.Controls;
diff --git a/src/AtomUI.Controls/Segmented/Segmented.cs b/src/AtomUI.Controls/Segmented/Segmented.cs
index 067a9aa..c964a12 100644
--- a/src/AtomUI.Controls/Segmented/Segmented.cs
+++ b/src/AtomUI.Controls/Segmented/Segmented.cs
@@ -1,7 +1,7 @@
using System.Collections.Specialized;
using AtomUI.Data;
-using AtomUI.Styling;
-using AtomUI.Utils;
+using AtomUI.Theme.Styling;
+using AtomUI.Theme.Utils;
using Avalonia;
using Avalonia.Animation;
using Avalonia.Collections;
diff --git a/src/AtomUI.Controls/Segmented/SegmentedItem.cs b/src/AtomUI.Controls/Segmented/SegmentedItem.cs
index 586aeea..1593c98 100644
--- a/src/AtomUI.Controls/Segmented/SegmentedItem.cs
+++ b/src/AtomUI.Controls/Segmented/SegmentedItem.cs
@@ -1,7 +1,8 @@
using AtomUI.Controls.Utils;
using AtomUI.Icon;
using AtomUI.Media;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
+using AtomUI.Theme.Utils;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Animation;
diff --git a/src/AtomUI.Controls/Segmented/SegmentedItemBox.cs b/src/AtomUI.Controls/Segmented/SegmentedItemBox.cs
index 961ce37..5f3fc6b 100644
--- a/src/AtomUI.Controls/Segmented/SegmentedItemBox.cs
+++ b/src/AtomUI.Controls/Segmented/SegmentedItemBox.cs
@@ -1,7 +1,7 @@
using AtomUI.Data;
using AtomUI.Media;
-using AtomUI.Styling;
-using AtomUI.Utils;
+using AtomUI.Theme.Styling;
+using AtomUI.Theme.Utils;
using Avalonia;
using Avalonia.Animation;
using Avalonia.Controls;
@@ -15,22 +15,23 @@ namespace AtomUI.Controls;
/// 在内部维护一些额外信息的控件,用户无感知
/// 绘制圆角什么的
///
-internal partial class SegmentedItemBox : TemplatedControl,
- ICustomHitTest,
- IControlCustomStyle
+internal class SegmentedItemBox : TemplatedControl,
+ ICustomHitTest,
+ IControlCustomStyle
{
#region 公共属性定义
+
public static readonly StyledProperty SizeTypeProperty =
Segmented.SizeTypeProperty.AddOwner();
-
+
public static readonly DirectProperty IsPressedProperty =
AvaloniaProperty.RegisterDirect(nameof(IsPressed), o => o.IsPressed);
-
+
public static readonly DirectProperty IsCurrentItemProperty =
- AvaloniaProperty.RegisterDirect(nameof(IsCurrentItem),
+ AvaloniaProperty.RegisterDirect(nameof(IsCurrentItem),
o => o.IsCurrentItem,
(o, v) => o.IsCurrentItem = v);
-
+
///
/// Gets or sets a value indicating whether the button is currently pressed.
///
@@ -39,7 +40,7 @@ internal partial class SegmentedItemBox : TemplatedControl,
get => _isPressed;
private set => SetAndRaise(IsPressedProperty, ref _isPressed, value);
}
-
+
public SizeType SizeType
{
get => GetValue(SizeTypeProperty);
@@ -53,40 +54,47 @@ internal partial class SegmentedItemBox : TemplatedControl,
internal static readonly StyledProperty ControlHeightProperty =
AvaloniaProperty.Register(
nameof(ControlHeight));
-
+
internal static readonly StyledProperty SegmentedItemPaddingProperty
= AvaloniaProperty.Register(nameof(SegmentedItemPadding));
-
+
internal static readonly StyledProperty TrackPaddingProperty
= AvaloniaProperty.Register(nameof(TrackPadding));
-
+
internal double ControlHeight
{
get => GetValue(ControlHeightProperty);
set => SetValue(ControlHeightProperty, value);
}
-
+
internal Thickness SegmentedItemPadding
{
get => GetValue(SegmentedItemPaddingProperty);
set => SetValue(SegmentedItemPaddingProperty, value);
}
-
+
internal Thickness TrackPadding
{
get => GetValue(TrackPaddingProperty);
set => SetValue(TrackPaddingProperty, value);
}
+
#endregion
-
+
internal Control Item { get; }
private bool _isCurrentItem;
- internal bool IsCurrentItem { get => _isCurrentItem; set => SetCurrentItem(value); }
+
+ internal bool IsCurrentItem
+ {
+ get => _isCurrentItem;
+ set => SetCurrentItem(value);
+ }
+
private IControlCustomStyle _customStyle;
private bool _isPressed = false;
private ControlStyleState _styleState;
-
+
public int LastItem { get; set; } = -1;
static SegmentedItemBox()
@@ -95,7 +103,7 @@ internal partial class SegmentedItemBox : TemplatedControl,
AffectsMeasure(SizeTypeProperty);
AffectsRender(BackgroundProperty);
}
-
+
public SegmentedItemBox(Control item)
{
_customStyle = this;
@@ -105,7 +113,7 @@ internal partial class SegmentedItemBox : TemplatedControl,
BindUtils.RelayBind(this, SizeTypeProperty, segmentedItem);
}
}
-
+
protected override Size MeasureOverride(Size availableSize)
{
// 由内置的 Box 布局
@@ -149,7 +157,7 @@ internal partial class SegmentedItemBox : TemplatedControl,
IsPressed = false;
}
}
-
+
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
{
base.OnApplyTemplate(e);
@@ -180,16 +188,16 @@ internal partial class SegmentedItemBox : TemplatedControl,
itemHeight = ControlHeight - padding;
return itemHeight;
}
-
+
public bool HitTest(Point point)
{
return true;
}
-
+
#region IControlCustomStyle 实现
void IControlCustomStyle.SetupTransitions()
- {
+ {
Transitions = new Transitions()
{
AnimationUtils.CreateTransition(BackgroundProperty),
@@ -212,7 +220,7 @@ internal partial class SegmentedItemBox : TemplatedControl,
_customStyle.UpdatePseudoClasses();
}
-
+
void IControlCustomStyle.HandlePropertyChangedForStyle(AvaloniaPropertyChangedEventArgs e)
{
@@ -222,11 +230,12 @@ internal partial class SegmentedItemBox : TemplatedControl,
_customStyle.CollectStyleState();
}
}
-
+
void IControlCustomStyle.UpdatePseudoClasses()
{
PseudoClasses.Set(StdPseudoClass.Pressed, IsPressed);
PseudoClasses.Set(StdPseudoClass.Selected, IsCurrentItem);
}
+
#endregion
}
\ No newline at end of file
diff --git a/src/AtomUI.Controls/Segmented/SegmentedItemBoxTheme.cs b/src/AtomUI.Controls/Segmented/SegmentedItemBoxTheme.cs
index d697139..cd6ceb1 100644
--- a/src/AtomUI.Controls/Segmented/SegmentedItemBoxTheme.cs
+++ b/src/AtomUI.Controls/Segmented/SegmentedItemBoxTheme.cs
@@ -1,4 +1,5 @@
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using Avalonia.Styling;
@@ -6,7 +7,7 @@ using Avalonia.Styling;
namespace AtomUI.Controls;
[ControlThemeProvider]
-public class SegmentedItemBoxTheme : ControlTheme
+public class SegmentedItemBoxTheme : BaseControlTheme
{
public SegmentedItemBoxTheme()
: base(typeof(SegmentedItemBox))
diff --git a/src/AtomUI.Controls/Segmented/SegmentedItemTheme.cs b/src/AtomUI.Controls/Segmented/SegmentedItemTheme.cs
index b23275b..804d22e 100644
--- a/src/AtomUI.Controls/Segmented/SegmentedItemTheme.cs
+++ b/src/AtomUI.Controls/Segmented/SegmentedItemTheme.cs
@@ -1,4 +1,5 @@
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
@@ -8,7 +9,7 @@ using Avalonia.Styling;
namespace AtomUI.Controls;
[ControlThemeProvider]
-internal class SegmentedItemTheme : ControlTheme
+internal class SegmentedItemTheme : BaseControlTheme
{
public const string MainLayoutPart = "PART_MainLayout";
diff --git a/src/AtomUI.Controls/Segmented/SegmentedTheme.cs b/src/AtomUI.Controls/Segmented/SegmentedTheme.cs
index 0a4dfb6..b56a606 100644
--- a/src/AtomUI.Controls/Segmented/SegmentedTheme.cs
+++ b/src/AtomUI.Controls/Segmented/SegmentedTheme.cs
@@ -1,4 +1,5 @@
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using Avalonia.Layout;
@@ -8,7 +9,7 @@ using Avalonia.Styling;
namespace AtomUI.Controls;
[ControlThemeProvider]
-public class SegmentedTheme : ControlTheme
+public class SegmentedTheme : BaseControlTheme
{
public const string MainContainerPart = "PART_MainContainer";
public SegmentedTheme()
diff --git a/src/AtomUI.Controls/Segmented/SegmentedToken.cs b/src/AtomUI.Controls/Segmented/SegmentedToken.cs
index c20db2e..82eacda 100644
--- a/src/AtomUI.Controls/Segmented/SegmentedToken.cs
+++ b/src/AtomUI.Controls/Segmented/SegmentedToken.cs
@@ -1,4 +1,4 @@
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
using Avalonia;
using Avalonia.Media;
diff --git a/src/AtomUI.Controls/Separator/Separator.cs b/src/AtomUI.Controls/Separator/Separator.cs
index 3986a50..03c3323 100644
--- a/src/AtomUI.Controls/Separator/Separator.cs
+++ b/src/AtomUI.Controls/Separator/Separator.cs
@@ -1,6 +1,6 @@
-using AtomUI.Data;
-using AtomUI.Media;
-using AtomUI.Styling;
+using AtomUI.Media;
+using AtomUI.Theme.Data;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Controls;
diff --git a/src/AtomUI.Controls/Separator/SeparatorTheme.cs b/src/AtomUI.Controls/Separator/SeparatorTheme.cs
index b8afae2..7f5bbc5 100644
--- a/src/AtomUI.Controls/Separator/SeparatorTheme.cs
+++ b/src/AtomUI.Controls/Separator/SeparatorTheme.cs
@@ -1,4 +1,6 @@
-using AtomUI.Styling;
+
+using AtomUI.Theme.Styling;
+using AtomUI.Theme;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
@@ -8,7 +10,7 @@ using Avalonia.Styling;
namespace AtomUI.Controls;
[ControlThemeProvider]
-internal class SeparatorTheme : ControlTheme
+internal class SeparatorTheme : BaseControlTheme
{
public const string TitlePart = "PART_Title";
diff --git a/src/AtomUI.Controls/Separator/SeparatorToken.cs b/src/AtomUI.Controls/Separator/SeparatorToken.cs
index b5ac35a..bb79468 100644
--- a/src/AtomUI.Controls/Separator/SeparatorToken.cs
+++ b/src/AtomUI.Controls/Separator/SeparatorToken.cs
@@ -1,4 +1,4 @@
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
using Avalonia;
namespace AtomUI.Controls;
diff --git a/src/AtomUI.Controls/Slider/SliderTheme.cs b/src/AtomUI.Controls/Slider/SliderTheme.cs
index 65aef18..01aa865 100644
--- a/src/AtomUI.Controls/Slider/SliderTheme.cs
+++ b/src/AtomUI.Controls/Slider/SliderTheme.cs
@@ -1,4 +1,5 @@
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using Avalonia.Data;
@@ -9,7 +10,7 @@ using Avalonia.Styling;
namespace AtomUI.Controls;
[ControlThemeProvider]
-internal class SliderTheme : ControlTheme
+internal class SliderTheme : BaseControlTheme
{
public const string TrackPart = "PART_Track";
public const string StartThumbPart = "PART_StartThumb";
diff --git a/src/AtomUI.Controls/Slider/SliderThumb.cs b/src/AtomUI.Controls/Slider/SliderThumb.cs
index 59f623d..01c7956 100644
--- a/src/AtomUI.Controls/Slider/SliderThumb.cs
+++ b/src/AtomUI.Controls/Slider/SliderThumb.cs
@@ -1,6 +1,6 @@
using AtomUI.Media;
-using AtomUI.Styling;
-using AtomUI.Utils;
+using AtomUI.Theme.Styling;
+using AtomUI.Theme.Utils;
using Avalonia;
using Avalonia.Animation;
using Avalonia.Automation.Peers;
diff --git a/src/AtomUI.Controls/Slider/SliderThumbTheme.cs b/src/AtomUI.Controls/Slider/SliderThumbTheme.cs
index 017d152..e74c4bf 100644
--- a/src/AtomUI.Controls/Slider/SliderThumbTheme.cs
+++ b/src/AtomUI.Controls/Slider/SliderThumbTheme.cs
@@ -1,11 +1,12 @@
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using Avalonia;
using Avalonia.Styling;
namespace AtomUI.Controls;
[ControlThemeProvider]
-internal class SliderThumbTheme : ControlTheme
+internal class SliderThumbTheme : BaseControlTheme
{
public SliderThumbTheme() : base(typeof(SliderThumb))
{
diff --git a/src/AtomUI.Controls/Slider/SliderToken.cs b/src/AtomUI.Controls/Slider/SliderToken.cs
index 030bb1b..a49753e 100644
--- a/src/AtomUI.Controls/Slider/SliderToken.cs
+++ b/src/AtomUI.Controls/Slider/SliderToken.cs
@@ -1,5 +1,5 @@
using AtomUI.Media;
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
using Avalonia;
using Avalonia.Media;
diff --git a/src/AtomUI.Controls/Slider/SliderTrack.cs b/src/AtomUI.Controls/Slider/SliderTrack.cs
index 7ee49f1..26cb33e 100644
--- a/src/AtomUI.Controls/Slider/SliderTrack.cs
+++ b/src/AtomUI.Controls/Slider/SliderTrack.cs
@@ -1,6 +1,7 @@
using System.Globalization;
using AtomUI.Media;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
+using AtomUI.Theme.Utils;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Animation;
diff --git a/src/AtomUI.Controls/Switch/SwitchKnob.cs b/src/AtomUI.Controls/Switch/SwitchKnob.cs
index 59d7977..1046e61 100644
--- a/src/AtomUI.Controls/Switch/SwitchKnob.cs
+++ b/src/AtomUI.Controls/Switch/SwitchKnob.cs
@@ -1,6 +1,7 @@
using AtomUI.Data;
using AtomUI.Media;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
+using AtomUI.Theme.Utils;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Animation;
diff --git a/src/AtomUI.Controls/Switch/ToggleSwitch.cs b/src/AtomUI.Controls/Switch/ToggleSwitch.cs
index 09e5e59..76a2d45 100644
--- a/src/AtomUI.Controls/Switch/ToggleSwitch.cs
+++ b/src/AtomUI.Controls/Switch/ToggleSwitch.cs
@@ -2,8 +2,8 @@ using AtomUI.Controls.Switch;
using AtomUI.Controls.Utils;
using AtomUI.Icon;
using AtomUI.Media;
-using AtomUI.Styling;
-using AtomUI.Utils;
+using AtomUI.Theme.Styling;
+using AtomUI.Theme.Utils;
using Avalonia;
using Avalonia.Animation;
using Avalonia.Controls;
diff --git a/src/AtomUI.Controls/Switch/ToggleSwitchTheme.cs b/src/AtomUI.Controls/Switch/ToggleSwitchTheme.cs
index a3418b4..7ee3117 100644
--- a/src/AtomUI.Controls/Switch/ToggleSwitchTheme.cs
+++ b/src/AtomUI.Controls/Switch/ToggleSwitchTheme.cs
@@ -1,4 +1,5 @@
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using Avalonia.Styling;
@@ -6,7 +7,7 @@ using Avalonia.Styling;
namespace AtomUI.Controls.Switch;
[ControlThemeProvider]
-public class ToggleSwitchTheme : ControlTheme
+public class ToggleSwitchTheme : BaseControlTheme
{
public const string SwitchKnobPart = "PART_SwitchKnob";
public const string MainContainerPart = "PART_MainContainer";
diff --git a/src/AtomUI.Controls/Switch/ToggleSwitchToken.cs b/src/AtomUI.Controls/Switch/ToggleSwitchToken.cs
index 9a39966..9426ea2 100644
--- a/src/AtomUI.Controls/Switch/ToggleSwitchToken.cs
+++ b/src/AtomUI.Controls/Switch/ToggleSwitchToken.cs
@@ -1,5 +1,5 @@
using AtomUI.Media;
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
using Avalonia;
using Avalonia.Media;
diff --git a/src/AtomUI.Controls/TabControl/BaseTabStripTheme.cs b/src/AtomUI.Controls/TabControl/BaseTabStripTheme.cs
index 6a67f11..66cd43d 100644
--- a/src/AtomUI.Controls/TabControl/BaseTabStripTheme.cs
+++ b/src/AtomUI.Controls/TabControl/BaseTabStripTheme.cs
@@ -1,9 +1,10 @@
-using Avalonia.Controls;
+using AtomUI.Theme;
+using Avalonia.Controls;
using Avalonia.Controls.Templates;
namespace AtomUI.Controls;
-internal class BaseTabStripTheme : ControlTheme
+internal class BaseTabStripTheme : BaseControlTheme
{
public const string MainContainerPart = "Part_MainContainer";
public const string ItemsPresenterPart = "PART_ItemsPresenter";
diff --git a/src/AtomUI.Controls/TabControl/TabControlToken.cs b/src/AtomUI.Controls/TabControl/TabControlToken.cs
index dd7aeb3..eeca8fe 100644
--- a/src/AtomUI.Controls/TabControl/TabControlToken.cs
+++ b/src/AtomUI.Controls/TabControl/TabControlToken.cs
@@ -1,4 +1,4 @@
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
using Avalonia;
using Avalonia.Media;
diff --git a/src/AtomUI.Controls/TabControl/TabStripTheme.cs b/src/AtomUI.Controls/TabControl/TabStripTheme.cs
index ba1873a..5f5980d 100644
--- a/src/AtomUI.Controls/TabControl/TabStripTheme.cs
+++ b/src/AtomUI.Controls/TabControl/TabStripTheme.cs
@@ -1,4 +1,4 @@
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using Avalonia.Controls;
using Avalonia.Controls.Presenters;
using Avalonia.Controls.Templates;
diff --git a/src/AtomUI.Controls/Tag/Tag.cs b/src/AtomUI.Controls/Tag/Tag.cs
index 35543aa..71bced6 100644
--- a/src/AtomUI.Controls/Tag/Tag.cs
+++ b/src/AtomUI.Controls/Tag/Tag.cs
@@ -1,7 +1,8 @@
using AtomUI.Controls.Utils;
-using AtomUI.Data;
-using AtomUI.Palette;
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Data;
+using AtomUI.Theme.Palette;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Controls;
diff --git a/src/AtomUI.Controls/Tag/TagTheme.cs b/src/AtomUI.Controls/Tag/TagTheme.cs
index f51fc6d..64b67db 100644
--- a/src/AtomUI.Controls/Tag/TagTheme.cs
+++ b/src/AtomUI.Controls/Tag/TagTheme.cs
@@ -1,4 +1,5 @@
-using AtomUI.Styling;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
@@ -7,7 +8,7 @@ using Avalonia.Layout;
namespace AtomUI.Controls;
[ControlThemeProvider]
-internal class TagTheme : ControlTheme
+internal class TagTheme : BaseControlTheme
{
public const string MainContainerPart = "PART_MainContainer";
public const string CloseButtonPart = "PART_CloseButton";
diff --git a/src/AtomUI.Controls/Tag/TagToken.cs b/src/AtomUI.Controls/Tag/TagToken.cs
index 654dbcb..85939c2 100644
--- a/src/AtomUI.Controls/Tag/TagToken.cs
+++ b/src/AtomUI.Controls/Tag/TagToken.cs
@@ -1,5 +1,5 @@
using AtomUI.Media;
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
using Avalonia;
using Avalonia.Media;
diff --git a/src/AtomUI.Controls/Tooltip/ToolTip.cs b/src/AtomUI.Controls/Tooltip/ToolTip.cs
index 8eb0473..60712ce 100644
--- a/src/AtomUI.Controls/Tooltip/ToolTip.cs
+++ b/src/AtomUI.Controls/Tooltip/ToolTip.cs
@@ -1,7 +1,7 @@
using System.Reflection;
-using AtomUI.Palette;
using AtomUI.Reflection;
-using AtomUI.Styling;
+using AtomUI.Theme.Palette;
+using AtomUI.Theme.Styling;
using AtomUI.Utils;
using Avalonia;
using Avalonia.Controls;
diff --git a/src/AtomUI.Controls/Tooltip/ToolTipTheme.cs b/src/AtomUI.Controls/Tooltip/ToolTipTheme.cs
index 81c3ebc..8995435 100644
--- a/src/AtomUI.Controls/Tooltip/ToolTipTheme.cs
+++ b/src/AtomUI.Controls/Tooltip/ToolTipTheme.cs
@@ -1,5 +1,5 @@
-using AtomUI.Styling;
-using AtomUI.Utils;
+using AtomUI.Theme;
+using AtomUI.Theme.Styling;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using Avalonia.Layout;
@@ -9,7 +9,7 @@ using Avalonia.Styling;
namespace AtomUI.Controls;
[ControlThemeProvider]
-internal class ToolTipTheme : ControlTheme
+internal class ToolTipTheme : BaseControlTheme
{
public const string ToolTipContainerPart = "PART_ToolTipContainer";
diff --git a/src/AtomUI.Controls/Tooltip/ToolTipToken.cs b/src/AtomUI.Controls/Tooltip/ToolTipToken.cs
index c3c7e48..f4de0c8 100644
--- a/src/AtomUI.Controls/Tooltip/ToolTipToken.cs
+++ b/src/AtomUI.Controls/Tooltip/ToolTipToken.cs
@@ -1,4 +1,4 @@
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
using Avalonia;
using Avalonia.Media;
diff --git a/src/AtomUI.Controls/Utils/WaveSpiritAdorner.cs b/src/AtomUI.Controls/Utils/WaveSpiritAdorner.cs
index fdbe7b8..5454fe1 100644
--- a/src/AtomUI.Controls/Utils/WaveSpiritAdorner.cs
+++ b/src/AtomUI.Controls/Utils/WaveSpiritAdorner.cs
@@ -1,4 +1,4 @@
-using AtomUI.Utils;
+using AtomUI.Theme;
using Avalonia;
using Avalonia.Animation;
using Avalonia.Animation.Easings;
diff --git a/src/AtomUI.Controls/Window/CaptionButton.cs b/src/AtomUI.Controls/Window/CaptionButton.cs
index c2629f5..38b73ae 100644
--- a/src/AtomUI.Controls/Window/CaptionButton.cs
+++ b/src/AtomUI.Controls/Window/CaptionButton.cs
@@ -1,6 +1,6 @@
using AtomUI.Controls.Controls;
using AtomUI.Data;
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
using Avalonia;
using Avalonia.Input;
using Avalonia.Layout;
diff --git a/src/AtomUI.Controls/Window/CaptionButtonThemeProvider.cs b/src/AtomUI.Controls/Window/CaptionButtonThemeProvider.cs
index 1e257e5..12d0cf0 100644
--- a/src/AtomUI.Controls/Window/CaptionButtonThemeProvider.cs
+++ b/src/AtomUI.Controls/Window/CaptionButtonThemeProvider.cs
@@ -1,5 +1,5 @@
using AtomUI.Controls.Window;
-using AtomUI.Styling;
+using AtomUI.Theme.Styling;
using Avalonia.Styling;
namespace AtomUI.Controls.Controls.Window;
diff --git a/src/AtomUI.Controls/Window/CaptionButtonToken.cs b/src/AtomUI.Controls/Window/CaptionButtonToken.cs
index 8c7d4ca..7a63590 100644
--- a/src/AtomUI.Controls/Window/CaptionButtonToken.cs
+++ b/src/AtomUI.Controls/Window/CaptionButtonToken.cs
@@ -1,4 +1,4 @@
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
using Avalonia.Media;
namespace AtomUI.Controls.Controls;
diff --git a/src/AtomUI.Controls/Window/Window.cs b/src/AtomUI.Controls/Window/Window.cs
index 1f86577..9bd614f 100644
--- a/src/AtomUI.Controls/Window/Window.cs
+++ b/src/AtomUI.Controls/Window/Window.cs
@@ -1,4 +1,4 @@
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
namespace AtomUI.Controls.Window;
diff --git a/src/AtomUI.Controls/Window/WindowToken.cs b/src/AtomUI.Controls/Window/WindowToken.cs
index 330cd52..4afeb7a 100644
--- a/src/AtomUI.Controls/Window/WindowToken.cs
+++ b/src/AtomUI.Controls/Window/WindowToken.cs
@@ -1,4 +1,4 @@
-using AtomUI.TokenSystem;
+using AtomUI.Theme.TokenSystem;
using Avalonia.Media;
namespace AtomUI.Controls.Window;
diff --git a/src/AtomUI.Generator/TokenInfo/ResourceKeyClassSourceWriter.cs b/src/AtomUI.Generator/TokenInfo/ResourceKeyClassSourceWriter.cs
index f52cd27..6919269 100644
--- a/src/AtomUI.Generator/TokenInfo/ResourceKeyClassSourceWriter.cs
+++ b/src/AtomUI.Generator/TokenInfo/ResourceKeyClassSourceWriter.cs
@@ -20,7 +20,7 @@ public class ResourceKeyClassSourceWriter
private void SetupUsingInfos()
{
- _usingInfos.Add("AtomUI.TokenSystem");
+ _usingInfos.Add("AtomUI.Theme.TokenSystem");
}
public void Write()
@@ -117,7 +117,7 @@ public class ResourceKeyClassSourceWriter
compilationUnit = compilationUnit.AddUsings(usingSyntaxList.ToArray());
// 添加命名空间
- var namespaceSyntax = SyntaxFactory.NamespaceDeclaration(SyntaxFactory.ParseName("AtomUI.Styling"));
+ var namespaceSyntax = SyntaxFactory.NamespaceDeclaration(SyntaxFactory.ParseName("AtomUI.Theme.Styling"));
if (_tokenInfo.Tokens.Count != 0) {
namespaceSyntax = namespaceSyntax.AddMembers(BuildGlobalResourceKeyClassSyntax());
}
diff --git a/src/AtomUI.Generator/TokenResourceKeyGenerator.cs b/src/AtomUI.Generator/TokenResourceKeyGenerator.cs
index da9980f..1489885 100644
--- a/src/AtomUI.Generator/TokenResourceKeyGenerator.cs
+++ b/src/AtomUI.Generator/TokenResourceKeyGenerator.cs
@@ -5,8 +5,8 @@ namespace AtomUI.Generator;
[Generator]
public class TokenResourceKeyGenerator : IIncrementalGenerator
{
- public const string GlobalDesignTokenAttribute = "AtomUI.TokenSystem.GlobalDesignTokenAttribute";
- public const string ControlDesignTokenAttribute = "AtomUI.TokenSystem.ControlDesignTokenAttribute";
+ public const string GlobalDesignTokenAttribute = "AtomUI.Theme.TokenSystem.GlobalDesignTokenAttribute";
+ public const string ControlDesignTokenAttribute = "AtomUI.Theme.TokenSystem.ControlDesignTokenAttribute";
public void Initialize(IncrementalGeneratorInitializationContext initContext)
{
diff --git a/src/AtomUI.Theme/AppBuilderExtensions.cs b/src/AtomUI.Theme/AppBuilderExtensions.cs
index 9e1a288..16b7f71 100644
--- a/src/AtomUI.Theme/AppBuilderExtensions.cs
+++ b/src/AtomUI.Theme/AppBuilderExtensions.cs
@@ -1,6 +1,6 @@
using Avalonia;
-namespace AtomUI;
+namespace AtomUI.Theme;
public static class AtomUIExtensions
{
diff --git a/src/AtomUI.Theme/ControlTheme.cs b/src/AtomUI.Theme/BaseControlTheme.cs
similarity index 93%
rename from src/AtomUI.Theme/ControlTheme.cs
rename to src/AtomUI.Theme/BaseControlTheme.cs
index d9b6e7d..1329ec6 100644
--- a/src/AtomUI.Theme/ControlTheme.cs
+++ b/src/AtomUI.Theme/BaseControlTheme.cs
@@ -5,14 +5,12 @@ using Avalonia.Data;
using Avalonia.Data.Converters;
using Avalonia.Styling;
-namespace AtomUI;
+namespace AtomUI.Theme;
-using AvaloniaControlTheme = Avalonia.Styling.ControlTheme;
-
-public class ControlTheme : AvaloniaControlTheme
+public class BaseControlTheme : ControlTheme
{
- public ControlTheme() { }
- public ControlTheme(Type targetType) : base(targetType) { }
+ public BaseControlTheme() { }
+ public BaseControlTheme(Type targetType) : base(targetType) { }
public void Build()
{
diff --git a/src/AtomUI.Theme/Converters/ItemToObjectConverter.cs b/src/AtomUI.Theme/Converters/ItemToObjectConverter.cs
deleted file mode 100644
index fc5204d..0000000
--- a/src/AtomUI.Theme/Converters/ItemToObjectConverter.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Globalization;
-using Avalonia.Data.Converters;
-
-namespace AtomUI.Converters;
-
-public class ItemToObjectConverter : IValueConverter
-{
- public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
- {
- if (value is int i) {
- return Enumerable.Repeat(new object(), i).ToList();
- }
-
- return new List