diff --git a/Directory.Build.props b/Directory.Build.props
index 107eabd..0d94c5a 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,12 +1,12 @@
-
+
enable
enable
latest
-
-
-
+
+
+
diff --git a/Directory.Build.targets b/Directory.Build.targets
index bafae10..fdfca22 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -2,7 +2,7 @@
-
+
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/App.axaml.cs b/samples/AtomUI.Demo.Desktop/App.axaml.cs
index 43bca16..19e13d4 100644
--- a/samples/AtomUI.Demo.Desktop/App.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/App.axaml.cs
@@ -1,11 +1,11 @@
+using AtomUI.Demo.Desktop.Views;
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
-using AtomUI.Demo.Desktop.Views;
namespace AtomUI.Demo.Desktop;
-public partial class App : Application
+public class App : Application
{
public override void Initialize()
{
diff --git a/samples/AtomUI.Demo.Desktop/Assets/EmptyShowCase/empty.svg b/samples/AtomUI.Demo.Desktop/Assets/EmptyShowCase/empty.svg
index bac1d28..b3f7ef0 100644
--- a/samples/AtomUI.Demo.Desktop/Assets/EmptyShowCase/empty.svg
+++ b/samples/AtomUI.Demo.Desktop/Assets/EmptyShowCase/empty.svg
@@ -1 +1,43 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/AtomUI.Demo.Desktop.csproj b/samples/AtomUI.Demo.Desktop/AtomUI.Demo.Desktop.csproj
index ea36139..e7aa238 100644
--- a/samples/AtomUI.Demo.Desktop/AtomUI.Demo.Desktop.csproj
+++ b/samples/AtomUI.Demo.Desktop/AtomUI.Demo.Desktop.csproj
@@ -1,6 +1,6 @@
-
-
+
+
WinExe
@@ -9,8 +9,8 @@
-
-
+
+
@@ -19,19 +19,19 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
-
+
diff --git a/samples/AtomUI.Demo.Desktop/Base/ShowCaseItem.cs b/samples/AtomUI.Demo.Desktop/Base/ShowCaseItem.cs
index 96a5c4c..576a1ef 100644
--- a/samples/AtomUI.Demo.Desktop/Base/ShowCaseItem.cs
+++ b/samples/AtomUI.Demo.Desktop/Base/ShowCaseItem.cs
@@ -1,61 +1,65 @@
+using AtomUI.Controls;
using Avalonia;
using Avalonia.Controls;
using Avalonia.LogicalTree;
using Avalonia.Media;
+using Separator = AtomUI.Controls.Separator;
namespace AtomUI.Demo.Desktop;
public class ShowCaseItem : ContentControl
{
- private bool _initialized = false;
- public string Title { get; set; } = string.Empty;
- public string Description { get; set; } = string.Empty;
+ private bool _initialized;
+ public string Title { get; set; } = string.Empty;
+ public string Description { get; set; } = string.Empty;
- private void SetupUi()
- {
- var mainLayout = new StackPanel();
- var showCaseTitle = new AtomUI.Controls.Separator()
- {
- Title = Title,
- TitlePosition = AtomUI.Controls.SeparatorTitlePosition.Left,
- FontWeight = FontWeight.Bold,
- };
+ private void SetupUi()
+ {
+ var mainLayout = new StackPanel();
+ var showCaseTitle = new Separator
+ {
+ Title = Title,
+ TitlePosition = SeparatorTitlePosition.Left,
+ FontWeight = FontWeight.Bold
+ };
- if (Content is Control contentControl) {
- LogicalChildren.Remove(contentControl);
- mainLayout.Children.Add(contentControl);
- }
-
- mainLayout.Children.Add(new Border
- {
- Height = 10,
- Background = Brushes.Transparent
- });
- mainLayout.Children.Add(showCaseTitle);
- mainLayout.Children.Add(new TextBlock()
- {
- Text = Description,
- TextWrapping = TextWrapping.Wrap,
- Margin = new Thickness(0, 10, 0, 0)
- });
-
- var outerBorder = new Border()
- {
- BorderBrush = new SolidColorBrush(new Color(10, 5, 5, 5)),
- BorderThickness = new Thickness(1),
- Padding = new Thickness(20),
- Child = mainLayout,
- CornerRadius = new CornerRadius(8)
- };
-
- Content = outerBorder;
- }
+ if (Content is Control contentControl)
+ {
+ LogicalChildren.Remove(contentControl);
+ mainLayout.Children.Add(contentControl);
+ }
- protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)
- {
- if (!_initialized) {
- SetupUi();
- _initialized = true;
- }
- }
+ mainLayout.Children.Add(new Border
+ {
+ Height = 10,
+ Background = Brushes.Transparent
+ });
+ mainLayout.Children.Add(showCaseTitle);
+ mainLayout.Children.Add(new TextBlock
+ {
+ Text = Description,
+ TextWrapping = TextWrapping.Wrap,
+ Margin = new Thickness(0, 10, 0, 0)
+ });
+
+ var outerBorder = new Border
+ {
+ BorderBrush = new SolidColorBrush(new Color(10, 5, 5, 5)),
+ BorderThickness = new Thickness(1),
+ Padding = new Thickness(20),
+ Child = mainLayout,
+ CornerRadius = new CornerRadius(8)
+ };
+
+ Content = outerBorder;
+ }
+
+ protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)
+ {
+ if (!_initialized)
+ {
+ SetupUi();
+ _initialized = true;
+ }
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/Base/ShowCasePanel.cs b/samples/AtomUI.Demo.Desktop/Base/ShowCasePanel.cs
index f6ffea4..fa03069 100644
--- a/samples/AtomUI.Demo.Desktop/Base/ShowCasePanel.cs
+++ b/samples/AtomUI.Demo.Desktop/Base/ShowCasePanel.cs
@@ -10,83 +10,82 @@ namespace AtomUI.Demo.Desktop;
public class ShowCasePanel : Control
{
- public string? Id { get; protected set; }
- private bool _initialized = false;
- private StackPanel _leftContainer = default!;
- private StackPanel _rightContainer = default!;
-
- [Content]
- public AvaloniaControlList Children { get; } = new AvaloniaControlList();
+ private bool _initialized;
+ private StackPanel _leftContainer = default!;
+ private StackPanel _rightContainer = default!;
- public ShowCasePanel()
- {
- }
+ public string? Id { get; protected set; }
- protected void SetupUi()
- {
- var mainLayout = new UniformGrid()
- {
- Rows = 1,
- Columns = 2,
- Margin = new Thickness(0)
- };
- _leftContainer = new StackPanel()
- {
- Orientation = Orientation.Vertical,
- Spacing = 10,
- Margin = new Thickness(0, 0, 10, 0),
- };
- _rightContainer = new StackPanel()
- {
- Orientation = Orientation.Vertical,
- Spacing = 10,
- };
- mainLayout.Children.Add(_leftContainer);
- mainLayout.Children.Add(_rightContainer);
+ [Content] public AvaloniaControlList Children { get; } = new();
- for (int i = 0; i < Children.Count; ++i) {
- var control = Children[i];
- if (i % 2 == 0) {
- _leftContainer.Children.Add(control);
- } else {
- _rightContainer.Children.Add(control);
- }
- }
- var scrollView = new ScrollViewer()
- {
- Content = mainLayout,
- };
- LogicalChildren.Add(scrollView);
- VisualChildren.Add(scrollView);
- }
+ protected void SetupUi()
+ {
+ var mainLayout = new UniformGrid
+ {
+ Rows = 1,
+ Columns = 2,
+ Margin = new Thickness(0)
+ };
+ _leftContainer = new StackPanel
+ {
+ Orientation = Orientation.Vertical,
+ Spacing = 10,
+ Margin = new Thickness(0, 0, 10, 0)
+ };
+ _rightContainer = new StackPanel
+ {
+ Orientation = Orientation.Vertical,
+ Spacing = 10
+ };
+ mainLayout.Children.Add(_leftContainer);
+ mainLayout.Children.Add(_rightContainer);
- protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)
- {
- if (!_initialized) {
- SetupUi();
- NotifyShowCaseLayoutReady();
- _initialized = true;
- }
- base.OnAttachedToLogicalTree(e);
- }
+ for (var i = 0; i < Children.Count; ++i)
+ {
+ var control = Children[i];
+ if (i % 2 == 0)
+ _leftContainer.Children.Add(control);
+ else
+ _rightContainer.Children.Add(control);
+ }
- internal virtual void NotifyAboutToActive()
- {
- }
+ var scrollView = new ScrollViewer
+ {
+ Content = mainLayout
+ };
+ LogicalChildren.Add(scrollView);
+ VisualChildren.Add(scrollView);
+ }
- internal virtual void NotifyActivated()
- {
- }
+ protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)
+ {
+ if (!_initialized)
+ {
+ SetupUi();
+ NotifyShowCaseLayoutReady();
+ _initialized = true;
+ }
- internal virtual void NotifyAboutToDeactivated()
- {
- }
+ base.OnAttachedToLogicalTree(e);
+ }
- internal virtual void NotifyDeactivated()
- {
- }
+ internal virtual void NotifyAboutToActive()
+ {
+ }
- protected virtual void NotifyShowCaseLayoutReady()
- {
- }
+ internal virtual void NotifyActivated()
+ {
+ }
+
+ internal virtual void NotifyAboutToDeactivated()
+ {
+ }
+
+ internal virtual void NotifyDeactivated()
+ {
+ }
+
+ protected virtual void NotifyShowCaseLayoutReady()
+ {
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/Controls/Colors/ColorItemControl.axaml b/samples/AtomUI.Demo.Desktop/Controls/Colors/ColorItemControl.axaml
index 93ac497..96f4e4e 100644
--- a/samples/AtomUI.Demo.Desktop/Controls/Colors/ColorItemControl.axaml
+++ b/samples/AtomUI.Demo.Desktop/Controls/Colors/ColorItemControl.axaml
@@ -39,4 +39,4 @@
-
+
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/Controls/Colors/ColorItemControl.cs b/samples/AtomUI.Demo.Desktop/Controls/Colors/ColorItemControl.cs
index c609c78..bf3657b 100644
--- a/samples/AtomUI.Demo.Desktop/Controls/Colors/ColorItemControl.cs
+++ b/samples/AtomUI.Demo.Desktop/Controls/Colors/ColorItemControl.cs
@@ -1,15 +1,19 @@
+using AtomUI.Demo.Desktop.ViewModels;
using Avalonia;
using Avalonia.Controls.Primitives;
using Avalonia.Input;
using CommunityToolkit.Mvvm.Messaging;
-using AtomUI.Demo.Desktop.ViewModels;
namespace AtomUI.Demo.Desktop.Controls;
public class ColorItemControl : TemplatedControl
{
- public static readonly StyledProperty ColorNameProperty = AvaloniaProperty.Register(
- nameof(ColorName));
+ public static readonly StyledProperty ColorNameProperty =
+ AvaloniaProperty.Register(
+ nameof(ColorName));
+
+ public static readonly StyledProperty HexProperty = AvaloniaProperty.Register(
+ nameof(Hex));
public string? ColorName
{
@@ -17,22 +21,15 @@ public class ColorItemControl : TemplatedControl
set => SetValue(ColorNameProperty, value);
}
- public static readonly StyledProperty HexProperty = AvaloniaProperty.Register(
- nameof(Hex));
-
public string? Hex
{
get => GetValue(HexProperty);
set => SetValue(HexProperty, value);
}
-
+
protected override void OnPointerPressed(PointerPressedEventArgs e)
{
base.OnPointerPressed(e);
- if (this.DataContext is ColorItemViewModel v)
- {
- WeakReferenceMessenger.Default.Send(v);
- }
-
+ if (DataContext is ColorItemViewModel v) WeakReferenceMessenger.Default.Send(v);
}
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/Controls/Colors/ColorListControl.cs b/samples/AtomUI.Demo.Desktop/Controls/Colors/ColorListControl.cs
index b07a34e..402783a 100644
--- a/samples/AtomUI.Demo.Desktop/Controls/Colors/ColorListControl.cs
+++ b/samples/AtomUI.Demo.Desktop/Controls/Colors/ColorListControl.cs
@@ -6,12 +6,13 @@ namespace AtomUI.Demo.Desktop.Controls;
public class ColorListControl : TemplatedControl
{
- public static readonly StyledProperty ListDataProperty = AvaloniaProperty.Register(
- nameof(ListData), new ColorListViewModel());
+ public static readonly StyledProperty ListDataProperty =
+ AvaloniaProperty.Register(
+ nameof(ListData), new ColorListViewModel());
- public ColorListViewModel ListData
- {
- get => GetValue(ListDataProperty);
- set => SetValue(ListDataProperty, value);
- }
+ public ColorListViewModel ListData
+ {
+ get => GetValue(ListDataProperty);
+ set => SetValue(ListDataProperty, value);
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/Controls/Colors/ColorListGroupControl.cs b/samples/AtomUI.Demo.Desktop/Controls/Colors/ColorListGroupControl.cs
index 7c3aae5..aa4e09c 100644
--- a/samples/AtomUI.Demo.Desktop/Controls/Colors/ColorListGroupControl.cs
+++ b/samples/AtomUI.Demo.Desktop/Controls/Colors/ColorListGroupControl.cs
@@ -6,12 +6,13 @@ namespace AtomUI.Demo.Desktop.Controls;
public class ColorListGroupControl : TemplatedControl
{
- public static readonly StyledProperty GroupDataProperty = AvaloniaProperty.Register(
- nameof(GroupData), new ColorGroupViewModel());
+ public static readonly StyledProperty GroupDataProperty =
+ AvaloniaProperty.Register(
+ nameof(GroupData), new ColorGroupViewModel());
- public ColorGroupViewModel GroupData
- {
- get => GetValue(GroupDataProperty);
- set => SetValue(GroupDataProperty, value);
- }
+ public ColorGroupViewModel GroupData
+ {
+ get => GetValue(GroupDataProperty);
+ set => SetValue(GroupDataProperty, value);
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/Controls/PathIcon/IconGallery.axaml.cs b/samples/AtomUI.Demo.Desktop/Controls/PathIcon/IconGallery.axaml.cs
index eab4b92..a9323b2 100644
--- a/samples/AtomUI.Demo.Desktop/Controls/PathIcon/IconGallery.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/Controls/PathIcon/IconGallery.axaml.cs
@@ -1,50 +1,47 @@
+using AtomUI.Demo.Desktop.ViewModels;
+using AtomUI.Icon;
using Avalonia;
using Avalonia.Controls.Primitives;
using Avalonia.Input;
-using CommunityToolkit.Mvvm.Messaging;
-using AtomUI.Demo.Desktop.ViewModels;
-using AtomUI.Icon;
using Avalonia.LogicalTree;
+using CommunityToolkit.Mvvm.Messaging;
namespace AtomUI.Demo.Desktop.Controls;
public class IconGallery : TemplatedControl
{
- private bool _initialized = false;
- private IconGalleryModel _galleryModel;
-
- public static readonly StyledProperty IconThemeTypeProperty = AvaloniaProperty.Register(
- nameof(IconThemeType));
+ public static readonly StyledProperty IconThemeTypeProperty =
+ AvaloniaProperty.Register(
+ nameof(IconThemeType));
- public IconThemeType? IconThemeType
- {
- get => GetValue(IconThemeTypeProperty);
- set => SetValue(IconThemeTypeProperty, value);
- }
+ private readonly IconGalleryModel _galleryModel;
+ private bool _initialized;
- public IconGallery()
- {
- _galleryModel = new IconGalleryModel();
- DataContext = _galleryModel;
- }
+ public IconGallery()
+ {
+ _galleryModel = new IconGalleryModel();
+ DataContext = _galleryModel;
+ }
- protected override void OnPointerPressed(PointerPressedEventArgs e)
- {
- base.OnPointerPressed(e);
- if (this.DataContext is ColorItemViewModel v) {
- WeakReferenceMessenger.Default.Send(v);
- }
- }
-
- protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)
- {
- base.OnAttachedToLogicalTree(e);
- if (!_initialized) {
- if (IconThemeType.HasValue) {
- _galleryModel.LoadThemeIcons(IconThemeType.Value);
- }
- _initialized = true;
- }
- }
-
+ public IconThemeType? IconThemeType
+ {
+ get => GetValue(IconThemeTypeProperty);
+ set => SetValue(IconThemeTypeProperty, value);
+ }
+
+ protected override void OnPointerPressed(PointerPressedEventArgs e)
+ {
+ base.OnPointerPressed(e);
+ if (DataContext is ColorItemViewModel v) WeakReferenceMessenger.Default.Send(v);
+ }
+
+ protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)
+ {
+ base.OnAttachedToLogicalTree(e);
+ if (!_initialized)
+ {
+ if (IconThemeType.HasValue) _galleryModel.LoadThemeIcons(IconThemeType.Value);
+ _initialized = true;
+ }
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/Controls/PathIcon/IconInfoItem.axaml.cs b/samples/AtomUI.Demo.Desktop/Controls/PathIcon/IconInfoItem.axaml.cs
index 11cfbfb..de1d233 100644
--- a/samples/AtomUI.Demo.Desktop/Controls/PathIcon/IconInfoItem.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/Controls/PathIcon/IconInfoItem.axaml.cs
@@ -5,21 +5,21 @@ namespace AtomUI.Demo.Desktop.Controls;
public class IconInfoItem : TemplatedControl
{
- public static readonly StyledProperty IconNameProperty = AvaloniaProperty.Register(
- nameof(IconName));
+ public static readonly StyledProperty IconNameProperty = AvaloniaProperty.Register(
+ nameof(IconName));
- public string IconName
- {
- get => GetValue(IconNameProperty);
- set => SetValue(IconNameProperty, value);
- }
-
- public static readonly StyledProperty IconKindProperty = AvaloniaProperty.Register(
- nameof(IconKind));
+ public static readonly StyledProperty IconKindProperty = AvaloniaProperty.Register(
+ nameof(IconKind));
- public string IconKind
- {
- get => GetValue(IconKindProperty);
- set => SetValue(IconKindProperty, value);
- }
+ public string IconName
+ {
+ get => GetValue(IconNameProperty);
+ set => SetValue(IconNameProperty, value);
+ }
+
+ public string IconKind
+ {
+ get => GetValue(IconKindProperty);
+ set => SetValue(IconKindProperty, value);
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/Program.cs b/samples/AtomUI.Demo.Desktop/Program.cs
index 951320e..6123611 100644
--- a/samples/AtomUI.Demo.Desktop/Program.cs
+++ b/samples/AtomUI.Demo.Desktop/Program.cs
@@ -4,41 +4,43 @@ using AtomUI.Theme;
using Avalonia;
using Avalonia.Dialogs;
using Avalonia.Media;
-
#if DEBUG
using Nlnet.Avalonia.DevTools;
#endif
namespace AtomUI.Demo.Desktop;
-class Program
+internal class Program
{
- // Initialization code. Don't use any Avalonia, third-party APIs or any
- // SynchronizationContext-reliant code before AppMain is called: things aren't initialized
- // yet and stuff might break.
- [STAThread]
- public static void Main(string[] args) => BuildAvaloniaApp()
- .With(new FontManagerOptions
- {
- FontFallbacks = new[]
- {
- new FontFallback
- {
- FontFamily = new FontFamily("Microsoft YaHei")
- }
- }
- })
- .StartWithClassicDesktopLifetime(args);
-
- public static AppBuilder BuildAvaloniaApp()
- => AppBuilder.Configure()
- .UseManagedSystemDialogs()
- .UsePlatformDetect()
- .UseAtomUI()
+ // Initialization code. Don't use any Avalonia, third-party APIs or any
+ // SynchronizationContext-reliant code before AppMain is called: things aren't initialized
+ // yet and stuff might break.
+ [STAThread]
+ public static void Main(string[] args)
+ {
+ BuildAvaloniaApp()
+ .With(new FontManagerOptions
+ {
+ FontFallbacks = new[]
+ {
+ new FontFallback
+ {
+ FontFamily = new FontFamily("Microsoft YaHei")
+ }
+ }
+ })
+ .StartWithClassicDesktopLifetime(args);
+ }
+
+ public static AppBuilder BuildAvaloniaApp()
+ => AppBuilder.Configure()
+ .UseManagedSystemDialogs()
+ .UsePlatformDetect()
+ .UseAtomUI()
#if DEBUG
- .UseDevToolsForAvalonia()
+ .UseDevToolsForAvalonia()
#endif
- .UseIconPackage(true)
- .With(new Win32PlatformOptions())
- .LogToTrace();
+ .UseIconPackage(true)
+ .With(new Win32PlatformOptions())
+ .LogToTrace();
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/AlertShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/AlertShowCase.axaml
index 0aefa7d..ffec1d9 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/AlertShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/AlertShowCase.axaml
@@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
@@ -15,7 +14,8 @@
-
+
Success Text
Info Text
@@ -29,9 +29,10 @@
Warning Text Warning Text Warning Text Warning Text Warning Text Warning TextWarning Text
-
+
Error Text
-
+
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/AlertShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/AlertShowCase.axaml.cs
index 8402940..d57fb13 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/AlertShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/AlertShowCase.axaml.cs
@@ -4,8 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class AlertShowCase : UserControl
{
- public AlertShowCase()
- {
- InitializeComponent();
- }
+ public AlertShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/AvatarShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/AvatarShowCase.axaml
index 400fa7d..a986c24 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/AvatarShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/AvatarShowCase.axaml
@@ -1,11 +1,9 @@
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/AvatarShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/AvatarShowCase.axaml.cs
index 31dec67..eed53d3 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/AvatarShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/AvatarShowCase.axaml.cs
@@ -4,8 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class AvatarShowCase : UserControl
{
- public AvatarShowCase()
- {
- InitializeComponent();
- }
+ public AvatarShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/BadgeShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/BadgeShowCase.axaml
index 41e1280..c860bd7 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/BadgeShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/BadgeShowCase.axaml
@@ -5,11 +5,11 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
-
+
-
+
-
+
-
+
-
+
@@ -294,7 +298,8 @@
-
+
DynamicBadgeCountProperty =
- AvaloniaProperty.Register(nameof(DynamicBadgeCount), 5);
-
- public static readonly StyledProperty DynamicDotBadgeVisibleProperty =
- AvaloniaProperty.Register(nameof(DynamicDotBadgeVisible), true);
-
- public static readonly StyledProperty StandaloneSwitchCheckedProperty =
- AvaloniaProperty.Register(nameof(StandaloneSwitchChecked), true);
-
- public static readonly StyledProperty StandaloneBadgeCount1Property =
- AvaloniaProperty.Register(nameof(StandaloneBadgeCount1), 11);
-
- public static readonly StyledProperty StandaloneBadgeCount2Property =
- AvaloniaProperty.Register(nameof(StandaloneBadgeCount2), 25);
-
- public static readonly StyledProperty StandaloneBadgeCount3Property =
- AvaloniaProperty.Register(nameof(StandaloneBadgeCount3), 109);
-
- public double DynamicBadgeCount
- {
- get => GetValue(DynamicBadgeCountProperty);
- set => SetValue(DynamicBadgeCountProperty, value);
- }
-
- public bool DynamicDotBadgeVisible
- {
- get => GetValue(DynamicDotBadgeVisibleProperty);
- set => SetValue(DynamicDotBadgeVisibleProperty, value);
- }
-
- public bool StandaloneSwitchChecked
- {
- get => GetValue(StandaloneSwitchCheckedProperty);
- set => SetValue(StandaloneSwitchCheckedProperty, value);
- }
-
- public double StandaloneBadgeCount1
- {
- get => GetValue(StandaloneBadgeCount1Property);
- set => SetValue(StandaloneBadgeCount1Property, value);
- }
-
- public double StandaloneBadgeCount2
- {
- get => GetValue(StandaloneBadgeCount2Property);
- set => SetValue(StandaloneBadgeCount2Property, value);
- }
-
- public double StandaloneBadgeCount3
- {
- get => GetValue(StandaloneBadgeCount3Property);
- set => SetValue(StandaloneBadgeCount3Property, value);
- }
-
- public BadgeShowCase()
- {
- DataContext = this;
- InitializeComponent();
- }
-
- public void AddDynamicBadgeCount()
- {
- DynamicBadgeCount += 1;
- }
+ public static readonly StyledProperty DynamicBadgeCountProperty =
+ AvaloniaProperty.Register(nameof(DynamicBadgeCount), 5);
- public void SubDynamicBadgeCount()
- {
- var value = DynamicBadgeCount;
- value -= 1;
- value = Math.Max(value, 0);
- DynamicBadgeCount = value;
- }
-
- public void RandomDynamicBadgeCount()
- {
- var random = new Random();
- DynamicBadgeCount = random.Next(0, 110);
- }
+ public static readonly StyledProperty DynamicDotBadgeVisibleProperty =
+ AvaloniaProperty.Register(nameof(DynamicDotBadgeVisible), true);
- protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs args)
- {
- base.OnPropertyChanged(args);
- if (args.Property == StandaloneSwitchCheckedProperty) {
- var isChecked = args.GetNewValue();
- if (isChecked) {
- StandaloneBadgeCount1 = 11;
- StandaloneBadgeCount2 = 25;
- StandaloneBadgeCount3 = 109;
- } else {
- StandaloneBadgeCount1 = 0;
- StandaloneBadgeCount2 = 0;
- StandaloneBadgeCount3 = 0;
- }
- }
- }
+ public static readonly StyledProperty StandaloneSwitchCheckedProperty =
+ AvaloniaProperty.Register(nameof(StandaloneSwitchChecked), true);
+
+ public static readonly StyledProperty StandaloneBadgeCount1Property =
+ AvaloniaProperty.Register(nameof(StandaloneBadgeCount1), 11);
+
+ public static readonly StyledProperty StandaloneBadgeCount2Property =
+ AvaloniaProperty.Register(nameof(StandaloneBadgeCount2), 25);
+
+ public static readonly StyledProperty StandaloneBadgeCount3Property =
+ AvaloniaProperty.Register(nameof(StandaloneBadgeCount3), 109);
+
+ public BadgeShowCase()
+ {
+ DataContext = this;
+ InitializeComponent();
+ }
+
+ public double DynamicBadgeCount
+ {
+ get => GetValue(DynamicBadgeCountProperty);
+ set => SetValue(DynamicBadgeCountProperty, value);
+ }
+
+ public bool DynamicDotBadgeVisible
+ {
+ get => GetValue(DynamicDotBadgeVisibleProperty);
+ set => SetValue(DynamicDotBadgeVisibleProperty, value);
+ }
+
+ public bool StandaloneSwitchChecked
+ {
+ get => GetValue(StandaloneSwitchCheckedProperty);
+ set => SetValue(StandaloneSwitchCheckedProperty, value);
+ }
+
+ public double StandaloneBadgeCount1
+ {
+ get => GetValue(StandaloneBadgeCount1Property);
+ set => SetValue(StandaloneBadgeCount1Property, value);
+ }
+
+ public double StandaloneBadgeCount2
+ {
+ get => GetValue(StandaloneBadgeCount2Property);
+ set => SetValue(StandaloneBadgeCount2Property, value);
+ }
+
+ public double StandaloneBadgeCount3
+ {
+ get => GetValue(StandaloneBadgeCount3Property);
+ set => SetValue(StandaloneBadgeCount3Property, value);
+ }
+
+ public void AddDynamicBadgeCount()
+ {
+ DynamicBadgeCount += 1;
+ }
+
+ public void SubDynamicBadgeCount()
+ {
+ var value = DynamicBadgeCount;
+ value -= 1;
+ value = Math.Max(value, 0);
+ DynamicBadgeCount = value;
+ }
+
+ public void RandomDynamicBadgeCount()
+ {
+ var random = new Random();
+ DynamicBadgeCount = random.Next(0, 110);
+ }
+
+ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs args)
+ {
+ base.OnPropertyChanged(args);
+ if (args.Property == StandaloneSwitchCheckedProperty)
+ {
+ var isChecked = args.GetNewValue();
+ if (isChecked)
+ {
+ StandaloneBadgeCount1 = 11;
+ StandaloneBadgeCount2 = 25;
+ StandaloneBadgeCount3 = 109;
+ }
+ else
+ {
+ StandaloneBadgeCount1 = 0;
+ StandaloneBadgeCount2 = 0;
+ StandaloneBadgeCount3 = 0;
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/ButtonShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/ButtonShowCase.axaml
index 0ea635e..ba56f40 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/ButtonShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/ButtonShowCase.axaml
@@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
@@ -13,7 +12,8 @@
-
+
Primary Button
Default Button
@@ -22,7 +22,8 @@
-
+
-
+
-
+
-
+
@@ -200,7 +204,8 @@
-
+
@@ -236,7 +241,8 @@
-
+
@@ -292,7 +298,8 @@
-
+
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/ButtonShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/ButtonShowCase.axaml.cs
index e93842f..76d6387 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/ButtonShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/ButtonShowCase.axaml.cs
@@ -9,46 +9,46 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class ButtonShowCase : UserControl
{
- public static readonly StyledProperty ButtonSizeTypeProperty =
- AvaloniaProperty.Register(nameof(ButtonSizeType), SizeType.Large);
-
- public SizeType ButtonSizeType
- {
- get => GetValue(ButtonSizeTypeProperty);
- set => SetValue(ButtonSizeTypeProperty, value);
- }
-
- public ButtonShowCase()
- {
- InitializeComponent();
- DataContext = this;
-
- ButtonSizeTypeOptionGroup.OptionCheckedChanged += HandleButtonSizeTypeOptionCheckedChanged;
- LoadingBtn1.Click += HandleLoadingBtnClick;
- LoadingBtn2.Click += HandleLoadingBtnClick;
- LoadingBtn3.Click += HandleLoadingBtnClick;
- }
-
- private void HandleButtonSizeTypeOptionCheckedChanged(object? sender, OptionCheckedChangedEventArgs args)
- {
- if (args.Index == 0) {
- ButtonSizeType = SizeType.Large;
- } else if (args.Index == 1) {
- ButtonSizeType = SizeType.Middle;
- } else {
- ButtonSizeType = SizeType.Small;
- }
- }
+ public static readonly StyledProperty ButtonSizeTypeProperty =
+ AvaloniaProperty.Register(nameof(ButtonSizeType));
- private void HandleLoadingBtnClick(object? sender, RoutedEventArgs args)
- {
- if (sender is Button button) {
- button.IsLoading = true;
- Dispatcher.UIThread.InvokeAsync(async () =>
- {
- await Task.Delay(TimeSpan.FromSeconds(3));
- button.IsLoading = false;
- });
- }
- }
+ public ButtonShowCase()
+ {
+ InitializeComponent();
+ DataContext = this;
+
+ ButtonSizeTypeOptionGroup.OptionCheckedChanged += HandleButtonSizeTypeOptionCheckedChanged;
+ LoadingBtn1.Click += HandleLoadingBtnClick;
+ LoadingBtn2.Click += HandleLoadingBtnClick;
+ LoadingBtn3.Click += HandleLoadingBtnClick;
+ }
+
+ public SizeType ButtonSizeType
+ {
+ get => GetValue(ButtonSizeTypeProperty);
+ set => SetValue(ButtonSizeTypeProperty, value);
+ }
+
+ private void HandleButtonSizeTypeOptionCheckedChanged(object? sender, OptionCheckedChangedEventArgs args)
+ {
+ if (args.Index == 0)
+ ButtonSizeType = SizeType.Large;
+ else if (args.Index == 1)
+ ButtonSizeType = SizeType.Middle;
+ else
+ ButtonSizeType = SizeType.Small;
+ }
+
+ private void HandleLoadingBtnClick(object? sender, RoutedEventArgs args)
+ {
+ if (sender is Button button)
+ {
+ button.IsLoading = true;
+ Dispatcher.UIThread.InvokeAsync(async () =>
+ {
+ await Task.Delay(TimeSpan.FromSeconds(3));
+ button.IsLoading = false;
+ });
+ }
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/ButtonSpinnerShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/ButtonSpinnerShowCase.axaml
index 687e057..07f2f82 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/ButtonSpinnerShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/ButtonSpinnerShowCase.axaml
@@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
@@ -16,7 +15,8 @@
-
+
@@ -130,7 +130,8 @@
-
+
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/ButtonSpinnerShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/ButtonSpinnerShowCase.axaml.cs
index 50a3138..3fcd158 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/ButtonSpinnerShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/ButtonSpinnerShowCase.axaml.cs
@@ -4,39 +4,35 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class ButtonSpinnerShowCase : UserControl
{
- public ButtonSpinnerShowCase()
- {
- InitializeComponent();
- }
-
- public void HandleSpin(object sender, SpinEventArgs e)
- {
- var spinner = (ButtonSpinner)sender;
+ private readonly string[] _spinnerItems =
+ {
+ "床前明月光",
+ "疑是地上霜",
+ "举头望明月",
+ "低头思故乡"
+ };
- if (spinner.Content is TextBlock textBlock)
- {
- int value = Array.IndexOf(_spinnerItems, textBlock.Text);
- if (e.Direction == SpinDirection.Increase) {
- value++;
- } else {
- value--;
- }
+ public ButtonSpinnerShowCase()
+ {
+ InitializeComponent();
+ }
- if (value < 0) {
- value = _spinnerItems.Length - 1;
- } else if (value >= _spinnerItems.Length) {
- value = 0;
- }
- textBlock.Text = _spinnerItems[value];
- }
+ public void HandleSpin(object sender, SpinEventArgs e)
+ {
+ var spinner = (ButtonSpinner)sender;
- }
-
- private readonly string[] _spinnerItems = new[]
- {
- "床前明月光",
- "疑是地上霜",
- "举头望明月",
- "低头思故乡"
- };
+ if (spinner.Content is TextBlock textBlock)
+ {
+ var value = Array.IndexOf(_spinnerItems, textBlock.Text);
+ if (e.Direction == SpinDirection.Increase)
+ value++;
+ else
+ value--;
+
+ if (value < 0)
+ value = _spinnerItems.Length - 1;
+ else if (value >= _spinnerItems.Length) value = 0;
+ textBlock.Text = _spinnerItems[value];
+ }
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/CardShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/CardShowCase.axaml
index 1d89a62..abfdef0 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/CardShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/CardShowCase.axaml
@@ -1,11 +1,9 @@
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/CardShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/CardShowCase.axaml.cs
index 0375dfe..27982f0 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/CardShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/CardShowCase.axaml.cs
@@ -4,8 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class CardShowCase : UserControl
{
- public CardShowCase()
- {
- InitializeComponent();
- }
+ public CardShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/CheckBoxShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/CheckBoxShowCase.axaml
index 2065161..3e8fbd8 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/CheckBoxShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/CheckBoxShowCase.axaml
@@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
@@ -79,7 +78,8 @@
-
+
@@ -111,7 +111,8 @@
-
+
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/CheckBoxShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/CheckBoxShowCase.axaml.cs
index ce54b25..d2f01c1 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/CheckBoxShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/CheckBoxShowCase.axaml.cs
@@ -5,9 +5,9 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class CheckBoxShowCase : UserControl
{
- public CheckBoxShowCase()
- {
- DataContext = new CheckBoxShowCaseModel();
- InitializeComponent();
- }
+ public CheckBoxShowCase()
+ {
+ DataContext = new CheckBoxShowCaseModel();
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/CollapseShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/CollapseShowCase.axaml
index 9605355..88224c9 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/CollapseShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/CollapseShowCase.axaml
@@ -5,10 +5,10 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
-
+
@@ -28,7 +28,8 @@
-
+
@@ -65,7 +66,8 @@
-
+
@@ -155,17 +157,20 @@
Description="Render extra element in the top-right corner of each panel.">
-
+
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
-
+
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
-
+
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/CollapseShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/CollapseShowCase.axaml.cs
index eab86f2..66872da 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/CollapseShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/CollapseShowCase.axaml.cs
@@ -6,28 +6,27 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class CollapseShowCase : UserControl
{
- public static readonly StyledProperty CollapseExpandIconPositionProperty =
- AvaloniaProperty.Register(nameof(CollapseExpandIconPosition), CollapseExpandIconPosition.Start);
-
- public CollapseExpandIconPosition CollapseExpandIconPosition
- {
- get => GetValue(CollapseExpandIconPositionProperty);
- set => SetValue(CollapseExpandIconPositionProperty, value);
- }
-
- public CollapseShowCase()
- {
- InitializeComponent();
- DataContext = this;
- //ExpandButtonPosGroup.OptionCheckedChanged += HandleExpandButtonPosOptionCheckedChanged;
- }
-
- private void HandleExpandButtonPosOptionCheckedChanged(object? sender, OptionCheckedChangedEventArgs args)
- {
- if (args.Index == 0) {
- CollapseExpandIconPosition = CollapseExpandIconPosition.Start;
- } else if (args.Index == 1) {
- CollapseExpandIconPosition = CollapseExpandIconPosition.End;
- }
- }
+ public static readonly StyledProperty CollapseExpandIconPositionProperty =
+ AvaloniaProperty.Register(nameof(CollapseExpandIconPosition));
+
+ public CollapseShowCase()
+ {
+ InitializeComponent();
+ DataContext = this;
+
+ //ExpandButtonPosGroup.OptionCheckedChanged += HandleExpandButtonPosOptionCheckedChanged;
+ }
+
+ public CollapseExpandIconPosition CollapseExpandIconPosition
+ {
+ get => GetValue(CollapseExpandIconPositionProperty);
+ set => SetValue(CollapseExpandIconPositionProperty, value);
+ }
+
+ private void HandleExpandButtonPosOptionCheckedChanged(object? sender, OptionCheckedChangedEventArgs args)
+ {
+ if (args.Index == 0)
+ CollapseExpandIconPosition = CollapseExpandIconPosition.Start;
+ else if (args.Index == 1) CollapseExpandIconPosition = CollapseExpandIconPosition.End;
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/ComboBoxShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/ComboBoxShowCase.axaml
index a8848fc..7bfa4d5 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/ComboBoxShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/ComboBoxShowCase.axaml
@@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
@@ -19,7 +18,8 @@
-
+
@@ -148,7 +148,8 @@
-
+
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/ComboBoxShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/ComboBoxShowCase.axaml.cs
index b0b4efd..2552c89 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/ComboBoxShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/ComboBoxShowCase.axaml.cs
@@ -4,8 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class ComboBoxShowCase : UserControl
{
- public ComboBoxShowCase()
- {
- InitializeComponent();
- }
+ public ComboBoxShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/DatePickerShowCase.cs b/samples/AtomUI.Demo.Desktop/ShowCase/DatePickerShowCase.cs
index 48a23e8..62d4bf7 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/DatePickerShowCase.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/DatePickerShowCase.cs
@@ -4,8 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class DatePickerShowCase : UserControl
{
- public DatePickerShowCase()
- {
- InitializeComponent();
- }
+ public DatePickerShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/DatePickerShowCase.cs.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/DatePickerShowCase.cs.axaml
index c136226..5937b32 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/DatePickerShowCase.cs.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/DatePickerShowCase.cs.axaml
@@ -1,11 +1,9 @@
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/DrawerShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/DrawerShowCase.axaml
index 2867976..d367667 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/DrawerShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/DrawerShowCase.axaml
@@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
xmlns:utils="clr-namespace:AtomUI.Demo.Desktop.Utils"
mc:Ignorable="d">
@@ -51,7 +50,8 @@
-
+
@@ -66,15 +66,17 @@
-
+
-
+
-
+
@@ -102,9 +105,10 @@
-
+
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/DrawerShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/DrawerShowCase.axaml.cs
index 65ecc1f..2686364 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/DrawerShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/DrawerShowCase.axaml.cs
@@ -8,28 +8,22 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class DrawerShowCase : UserControl
{
- public DrawerShowCase()
- {
- InitializeComponent();
- }
+ public DrawerShowCase()
+ {
+ InitializeComponent();
+ }
- private void Button_OnClick(object? sender, RoutedEventArgs e)
- {
- if (sender is not Button button)
- {
- return;
- }
+ private void Button_OnClick(object? sender, RoutedEventArgs e)
+ {
+ if (sender is not Button button) return;
- if (Drawer.GetDrawer(button) is not { } drawer)
- {
- return;
- }
+ if (Drawer.GetDrawer(button) is not { } drawer) return;
- drawer.IsOpen = false;
- }
+ drawer.IsOpen = false;
+ }
- private void ButtonOpenOnCurrentParent_OnClick(object? sender, RoutedEventArgs e)
- {
- Drawer1.OpenOn = Drawer1.OpenOn?.Parent as Visual;
- }
+ private void ButtonOpenOnCurrentParent_OnClick(object? sender, RoutedEventArgs e)
+ {
+ Drawer1.OpenOn = Drawer1.OpenOn?.Parent as Visual;
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/DropdownButtonShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/DropdownButtonShowCase.axaml
index eca2815..29e09b9 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/DropdownButtonShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/DropdownButtonShowCase.axaml
@@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/DropdownButtonShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/DropdownButtonShowCase.axaml.cs
index b9074f3..ae93eb5 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/DropdownButtonShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/DropdownButtonShowCase.axaml.cs
@@ -4,8 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class DropdownButtonShowCase : UserControl
{
- public DropdownButtonShowCase()
- {
- InitializeComponent();
- }
+ public DropdownButtonShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/EmptyShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/EmptyShowCase.axaml
index a2ced8e..a31bdc5 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/EmptyShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/EmptyShowCase.axaml
@@ -5,14 +5,14 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
-
+
@@ -22,7 +22,8 @@
-
+
-
+
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/EmptyShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/EmptyShowCase.axaml.cs
index 81f2454..afcaa1e 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/EmptyShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/EmptyShowCase.axaml.cs
@@ -4,8 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class EmptyShowCase : UserControl
{
- public EmptyShowCase()
- {
- InitializeComponent();
- }
+ public EmptyShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/ExpanderShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/ExpanderShowCase.axaml
index 9ac3467..6b0b06b 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/ExpanderShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/ExpanderShowCase.axaml
@@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
@@ -16,7 +15,8 @@
-
+
@@ -47,7 +47,8 @@
-
+
ToggleIconPositionProperty =
- AvaloniaProperty.Register(nameof(ToggleIconPosition), ExpanderIconPosition.Start);
-
- public ExpanderIconPosition ToggleIconPosition
- {
- get => GetValue(ToggleIconPositionProperty);
- set => SetValue(ToggleIconPositionProperty, value);
- }
-
- public static readonly StyledProperty ExpandDirectionProperty =
- AvaloniaProperty.Register(nameof(ExpandDirection), ExpandDirection.Down);
-
- public ExpandDirection ExpandDirection
- {
- get => GetValue(ExpandDirectionProperty);
- set => SetValue(ExpandDirectionProperty, value);
- }
-
- public ExpanderShowCase()
- {
- InitializeComponent();
- DataContext = this;
- ExpandButtonPosGroup.OptionCheckedChanged += HandleExpandButtonPosOptionCheckedChanged;
- ExpandDirectionOptionGroup.OptionCheckedChanged += HandleExpandDirectionOptionCheckedChanged;
- }
-
- private void HandleExpandButtonPosOptionCheckedChanged(object? sender, OptionCheckedChangedEventArgs args)
- {
- if (args.Index == 0) {
- ToggleIconPosition = ExpanderIconPosition.Start;
- } else if (args.Index == 1) {
- ToggleIconPosition = ExpanderIconPosition.End;
- }
- }
-
- private void HandleExpandDirectionOptionCheckedChanged(object? sender, OptionCheckedChangedEventArgs args)
- {
- if (args.Index == 0) {
- ExpandDirection = ExpandDirection.Down;
- } else if (args.Index == 1) {
- ExpandDirection = ExpandDirection.Up;
- } else if (args.Index == 2) {
- ExpandDirection = ExpandDirection.Left;
- } else if (args.Index == 3) {
- ExpandDirection = ExpandDirection.Right;
- }
- }
+ public static readonly StyledProperty ToggleIconPositionProperty =
+ AvaloniaProperty.Register(nameof(ToggleIconPosition));
+
+ public static readonly StyledProperty ExpandDirectionProperty =
+ AvaloniaProperty.Register(nameof(ExpandDirection));
+
+ public ExpanderShowCase()
+ {
+ InitializeComponent();
+ DataContext = this;
+ ExpandButtonPosGroup.OptionCheckedChanged += HandleExpandButtonPosOptionCheckedChanged;
+ ExpandDirectionOptionGroup.OptionCheckedChanged += HandleExpandDirectionOptionCheckedChanged;
+ }
+
+ public ExpanderIconPosition ToggleIconPosition
+ {
+ get => GetValue(ToggleIconPositionProperty);
+ set => SetValue(ToggleIconPositionProperty, value);
+ }
+
+ public ExpandDirection ExpandDirection
+ {
+ get => GetValue(ExpandDirectionProperty);
+ set => SetValue(ExpandDirectionProperty, value);
+ }
+
+ private void HandleExpandButtonPosOptionCheckedChanged(object? sender, OptionCheckedChangedEventArgs args)
+ {
+ if (args.Index == 0)
+ ToggleIconPosition = ExpanderIconPosition.Start;
+ else if (args.Index == 1) ToggleIconPosition = ExpanderIconPosition.End;
+ }
+
+ private void HandleExpandDirectionOptionCheckedChanged(object? sender, OptionCheckedChangedEventArgs args)
+ {
+ if (args.Index == 0)
+ ExpandDirection = ExpandDirection.Down;
+ else if (args.Index == 1)
+ ExpandDirection = ExpandDirection.Up;
+ else if (args.Index == 2)
+ ExpandDirection = ExpandDirection.Left;
+ else if (args.Index == 3) ExpandDirection = ExpandDirection.Right;
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/GroupBoxShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/GroupBoxShowCase.axaml
index 956de0a..21f2742 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/GroupBoxShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/GroupBoxShowCase.axaml
@@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
@@ -18,7 +17,8 @@
-
+
@@ -44,7 +44,8 @@
-
+
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/GroupBoxShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/GroupBoxShowCase.axaml.cs
index 0e4deec..42e7a90 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/GroupBoxShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/GroupBoxShowCase.axaml.cs
@@ -4,8 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class GroupBoxShowCase : UserControl
{
- public GroupBoxShowCase()
- {
- InitializeComponent();
- }
+ public GroupBoxShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/IconShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/IconShowCase.axaml.cs
index 8d6bc44..d7d3095 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/IconShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/IconShowCase.axaml.cs
@@ -1,25 +1,22 @@
+using AtomUI.Demo.Desktop.ViewModels;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.Threading;
-using AtomUI.Demo.Desktop.ViewModels;
namespace AtomUI.Demo.Desktop.ShowCase;
public partial class IconShowCase : UserControl
{
- public IconShowCase()
- {
- InitializeComponent();
- }
+ public IconShowCase()
+ {
+ InitializeComponent();
+ }
- protected override async void OnApplyTemplate(TemplateAppliedEventArgs e)
- {
- base.OnApplyTemplate(e);
- PaletteDemoViewModel vm = new PaletteDemoViewModel();
- await Dispatcher.UIThread.InvokeAsync(() =>
- {
- vm.InitializeResources();
- });
- DataContext = vm;
- }
+ protected override async void OnApplyTemplate(TemplateAppliedEventArgs e)
+ {
+ base.OnApplyTemplate(e);
+ var vm = new PaletteDemoViewModel();
+ await Dispatcher.UIThread.InvokeAsync(() => { vm.InitializeResources(); });
+ DataContext = vm;
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/InfoFlyoutShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/InfoFlyoutShowCase.axaml
index c4064b1..0292f9b 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/InfoFlyoutShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/InfoFlyoutShowCase.axaml
@@ -5,10 +5,10 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
-
+
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/InfoFlyoutShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/InfoFlyoutShowCase.axaml.cs
index 4ec0ddb..b96ffb4 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/InfoFlyoutShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/InfoFlyoutShowCase.axaml.cs
@@ -6,44 +6,49 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class InfoFlyoutShowCase : UserControl
{
- public static readonly StyledProperty ShowArrowProperty =
- AvaloniaProperty.Register(nameof(ShowArrow), true);
-
- public static readonly StyledProperty IsPointAtCenterProperty =
- AvaloniaProperty.Register(nameof(IsPointAtCenter), false);
+ public static readonly StyledProperty ShowArrowProperty =
+ AvaloniaProperty.Register(nameof(ShowArrow), true);
- private Segmented _segmented;
-
- public bool ShowArrow
- {
- get => GetValue(ShowArrowProperty);
- set => SetValue(ShowArrowProperty, value);
- }
-
- public bool IsPointAtCenter
- {
- get => GetValue(IsPointAtCenterProperty);
- set => SetValue(IsPointAtCenterProperty, value);
- }
-
- public InfoFlyoutShowCase()
- {
- DataContext = this;
- InitializeComponent();
- var control = this as Control;
- _segmented = control.FindControl("ArrowSegmented")!;
- _segmented.SelectionChanged += (sender, args) =>
- {
- if (_segmented.SelectedIndex == 0) {
- ShowArrow = true;
- IsPointAtCenter = false;
- } else if (_segmented.SelectedIndex == 1) {
- ShowArrow = false;
- IsPointAtCenter = false;
- } else if (_segmented.SelectedIndex == 2) {
- IsPointAtCenter = true;
- ShowArrow = true;
- }
- };
- }
+ public static readonly StyledProperty IsPointAtCenterProperty =
+ AvaloniaProperty.Register(nameof(IsPointAtCenter));
+
+ private readonly Segmented _segmented;
+
+ public InfoFlyoutShowCase()
+ {
+ DataContext = this;
+ InitializeComponent();
+ var control = this as Control;
+ _segmented = control.FindControl("ArrowSegmented")!;
+ _segmented.SelectionChanged += (sender, args) =>
+ {
+ if (_segmented.SelectedIndex == 0)
+ {
+ ShowArrow = true;
+ IsPointAtCenter = false;
+ }
+ else if (_segmented.SelectedIndex == 1)
+ {
+ ShowArrow = false;
+ IsPointAtCenter = false;
+ }
+ else if (_segmented.SelectedIndex == 2)
+ {
+ IsPointAtCenter = true;
+ ShowArrow = true;
+ }
+ };
+ }
+
+ public bool ShowArrow
+ {
+ get => GetValue(ShowArrowProperty);
+ set => SetValue(ShowArrowProperty, value);
+ }
+
+ public bool IsPointAtCenter
+ {
+ get => GetValue(IsPointAtCenterProperty);
+ set => SetValue(IsPointAtCenterProperty, value);
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/LineEditShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/LineEditShowCase.axaml
index e843807..08b8156 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/LineEditShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/LineEditShowCase.axaml
@@ -5,14 +5,14 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
-
+
@@ -55,7 +55,8 @@
-
+
-
+ Watermark="Enter your username" />
-
+
@@ -127,7 +130,8 @@
-
+
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/LineEditShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/LineEditShowCase.axaml.cs
index 0ff4537..3a337d9 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/LineEditShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/LineEditShowCase.axaml.cs
@@ -4,9 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class LineEditShowCase : UserControl
{
- public LineEditShowCase()
- {
- InitializeComponent();
- }
-
+ public LineEditShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/ListBoxShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/ListBoxShowCase.axaml
index 22958d6..7b9af8d 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/ListBoxShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/ListBoxShowCase.axaml
@@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/ListBoxShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/ListBoxShowCase.axaml.cs
index 7c9b24e..50c1f1a 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/ListBoxShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/ListBoxShowCase.axaml.cs
@@ -4,8 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class ListBoxShowCase : UserControl
{
- public ListBoxShowCase()
- {
- InitializeComponent();
- }
+ public ListBoxShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/LoadingIndicatorShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/LoadingIndicatorShowCase.axaml
index 816f7fa..87c1070 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/LoadingIndicatorShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/LoadingIndicatorShowCase.axaml
@@ -5,14 +5,14 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
-
+
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/LoadingIndicatorShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/LoadingIndicatorShowCase.axaml.cs
index a1c7be9..0fb6e9e 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/LoadingIndicatorShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/LoadingIndicatorShowCase.axaml.cs
@@ -5,19 +5,18 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class LoadingIndicatorShowCase : UserControl
{
- public static readonly StyledProperty IsLoadingSwitchCheckedProperty =
- AvaloniaProperty.Register(nameof(IsLoadingSwitchChecked), false);
-
- public bool IsLoadingSwitchChecked
- {
- get => GetValue(IsLoadingSwitchCheckedProperty);
- set => SetValue(IsLoadingSwitchCheckedProperty, value);
- }
-
- public LoadingIndicatorShowCase()
- {
- DataContext = this;
- InitializeComponent();
- }
-
+ public static readonly StyledProperty IsLoadingSwitchCheckedProperty =
+ AvaloniaProperty.Register(nameof(IsLoadingSwitchChecked));
+
+ public LoadingIndicatorShowCase()
+ {
+ DataContext = this;
+ InitializeComponent();
+ }
+
+ public bool IsLoadingSwitchChecked
+ {
+ get => GetValue(IsLoadingSwitchCheckedProperty);
+ set => SetValue(IsLoadingSwitchCheckedProperty, value);
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/MenuShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/MenuShowCase.axaml
index e776e0b..e2e9944 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/MenuShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/MenuShowCase.axaml
@@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
@@ -59,7 +58,8 @@
-
+
-
+
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/MenuShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/MenuShowCase.axaml.cs
index 0efbe47..ef812aa 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/MenuShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/MenuShowCase.axaml.cs
@@ -4,9 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class MenuShowCase : UserControl
{
- public MenuShowCase()
- {
- InitializeComponent();
- }
-
+ public MenuShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/MessageShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/MessageShowCase.axaml
index ae0fdb5..5fda375 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/MessageShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/MessageShowCase.axaml
@@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
@@ -14,7 +13,8 @@
-
+
Success
@@ -31,13 +31,15 @@
-
+
Display a loading indicator
-
+
Display a loading indicator
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/MessageShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/MessageShowCase.axaml.cs
index a09e8e5..d6fea18 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/MessageShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/MessageShowCase.axaml.cs
@@ -7,92 +7,92 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class MessageShowCase : UserControl
{
- private WindowMessageManager? _messageManager;
+ private WindowMessageManager? _messageManager;
- public MessageShowCase()
- {
- InitializeComponent();
- }
+ public MessageShowCase()
+ {
+ InitializeComponent();
+ }
- protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
- {
- base.OnAttachedToVisualTree(e);
- var topLevel = TopLevel.GetTopLevel(this);
- _messageManager = new WindowMessageManager(topLevel)
- {
- MaxItems = 10
- };
- }
+ protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
+ {
+ base.OnAttachedToVisualTree(e);
+ var topLevel = TopLevel.GetTopLevel(this);
+ _messageManager = new WindowMessageManager(topLevel)
+ {
+ MaxItems = 10
+ };
+ }
- private void ShowSimpleMessage(object? sender, RoutedEventArgs e)
- {
- _messageManager?.Show(new Message(
- content: "Hello, AtomUI/Avalonia!"
- ));
- }
+ private void ShowSimpleMessage(object? sender, RoutedEventArgs e)
+ {
+ _messageManager?.Show(new Message(
+ "Hello, AtomUI/Avalonia!"
+ ));
+ }
- private void ShowInfoMessage(object? sender, RoutedEventArgs e)
- {
- _messageManager?.Show(new Message(
- type: MessageType.Information,
- content: "This is a information message."
- ));
- }
+ private void ShowInfoMessage(object? sender, RoutedEventArgs e)
+ {
+ _messageManager?.Show(new Message(
+ type: MessageType.Information,
+ content: "This is a information message."
+ ));
+ }
- private void ShowSuccessMessage(object? sender, RoutedEventArgs e)
- {
- _messageManager?.Show(new Message(
- type: MessageType.Success,
- content: "This is a success message."
- ));
- }
+ private void ShowSuccessMessage(object? sender, RoutedEventArgs e)
+ {
+ _messageManager?.Show(new Message(
+ type: MessageType.Success,
+ content: "This is a success message."
+ ));
+ }
- private void ShowWarningMessage(object? sender, RoutedEventArgs e)
- {
- _messageManager?.Show(new Message(
- type: MessageType.Warning,
- content: "This is a warning message."
- ));
- }
+ private void ShowWarningMessage(object? sender, RoutedEventArgs e)
+ {
+ _messageManager?.Show(new Message(
+ type: MessageType.Warning,
+ content: "This is a warning message."
+ ));
+ }
- private void ShowErrorMessage(object? sender, RoutedEventArgs e)
- {
- _messageManager?.Show(new Message(
- type: MessageType.Error,
- content: "This is a error message."
- ));
- }
+ private void ShowErrorMessage(object? sender, RoutedEventArgs e)
+ {
+ _messageManager?.Show(new Message(
+ type: MessageType.Error,
+ content: "This is a error message."
+ ));
+ }
- private void ShowLoadingMessage(object? sender, RoutedEventArgs e)
- {
- _messageManager?.Show(new Message(
- type: MessageType.Loading,
- content: "Action in progress..."
- ));
- }
+ private void ShowLoadingMessage(object? sender, RoutedEventArgs e)
+ {
+ _messageManager?.Show(new Message(
+ type: MessageType.Loading,
+ content: "Action in progress..."
+ ));
+ }
- private void ShowSequentialMessage(object? sender, RoutedEventArgs e)
- {
- _messageManager?.Show(new Message(
- type: MessageType.Loading,
- content: "Action in progress...",
- expiration: TimeSpan.FromSeconds(2.5),
- onClose: () =>
- {
- _messageManager?.Show(new Message(
- type: MessageType.Success,
- expiration: TimeSpan.FromSeconds(2.5),
- content: "Loading finished",
- onClose: () =>
- {
- _messageManager?.Show(new Message(
- type: MessageType.Information,
- expiration: TimeSpan.FromSeconds(2.5),
- content: "Loading finished"
- ));
- }
- ));
- }
- ));
- }
+ private void ShowSequentialMessage(object? sender, RoutedEventArgs e)
+ {
+ _messageManager?.Show(new Message(
+ type: MessageType.Loading,
+ content: "Action in progress...",
+ expiration: TimeSpan.FromSeconds(2.5),
+ onClose: () =>
+ {
+ _messageManager?.Show(new Message(
+ type: MessageType.Success,
+ expiration: TimeSpan.FromSeconds(2.5),
+ content: "Loading finished",
+ onClose: () =>
+ {
+ _messageManager?.Show(new Message(
+ type: MessageType.Information,
+ expiration: TimeSpan.FromSeconds(2.5),
+ content: "Loading finished"
+ ));
+ }
+ ));
+ }
+ ));
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/NotificationShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/NotificationShowCase.axaml
index a97fc41..8ce5316 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/NotificationShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/NotificationShowCase.axaml
@@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
@@ -14,13 +13,15 @@
-
+
Open the notification box
-
+
Success
@@ -37,7 +38,8 @@
-
+
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/NotificationShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/NotificationShowCase.axaml.cs
index 318092a..72dd8d3 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/NotificationShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/NotificationShowCase.axaml.cs
@@ -8,199 +8,204 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class NotificationShowCase : UserControl
{
- private WindowNotificationManager? _basicManager;
- private WindowNotificationManager? _topLeftManager;
- private WindowNotificationManager? _topManager;
- private WindowNotificationManager? _topRightManager;
-
- private WindowNotificationManager? _bottomLeftManager;
- private WindowNotificationManager? _bottomManager;
- private WindowNotificationManager? _bottomRightManager;
-
- public NotificationShowCase()
- {
- InitializeComponent();
- HoverOptionGroup.OptionCheckedChanged += HandleHoverOptionGroupCheckedChanged;
- }
+ private WindowNotificationManager? _basicManager;
- private void HandleHoverOptionGroupCheckedChanged(object? sender, OptionCheckedChangedEventArgs args)
- {
- if (_basicManager is not null) {
- if (args.Index == 0) {
- _basicManager.IsPauseOnHover = true;
- } else {
- _basicManager.IsPauseOnHover = false;
- }
- }
- }
-
- protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
- {
- base.OnAttachedToVisualTree(e);
- var topLevel = TopLevel.GetTopLevel(this);
- _basicManager = new WindowNotificationManager(topLevel)
- {
- MaxItems = 3
- };
-
- _topLeftManager = new WindowNotificationManager(topLevel)
- {
- MaxItems = 3,
- Position = NotificationPosition.TopLeft
- };
-
- _topManager = new WindowNotificationManager(topLevel)
- {
- Position = NotificationPosition.TopCenter,
- MaxItems = 3
- };
-
- _topRightManager = new WindowNotificationManager(topLevel)
- {
- Position = NotificationPosition.TopRight,
- MaxItems = 3
- };
-
- _bottomLeftManager = new WindowNotificationManager(topLevel)
- {
- Position = NotificationPosition.BottomLeft,
- MaxItems = 3
- };
-
- _bottomManager = new WindowNotificationManager(topLevel)
- {
- Position = NotificationPosition.BottomCenter,
- MaxItems = 3
- };
-
- _bottomRightManager = new WindowNotificationManager(topLevel)
- {
- Position = NotificationPosition.BottomRight,
- MaxItems = 3
- };
- }
+ private WindowNotificationManager? _bottomLeftManager;
+ private WindowNotificationManager? _bottomManager;
+ private WindowNotificationManager? _bottomRightManager;
+ private WindowNotificationManager? _topLeftManager;
+ private WindowNotificationManager? _topManager;
+ private WindowNotificationManager? _topRightManager;
- private void ShowSimpleNotification(object? sender, RoutedEventArgs e)
- {
- _basicManager?.Show(new Notification(
- title: "Notification Title",
- content: "Hello, AtomUI/Avalonia!"
- ));
- }
-
- private void ShowNeverCloseNotification(object? sender, RoutedEventArgs e)
- {
- _basicManager?.Show(new Notification(
- expiration : TimeSpan.Zero,
- title : "Notification Title",
- content : "I will never close automatically. This is a purposely very very long description that has many many characters and words."
- ));
- }
-
- private void ShowSuccessNotification(object? sender, RoutedEventArgs e)
- {
- _basicManager?.Show(new Notification(
- type: NotificationType.Success,
- title: "Notification Title",
- content: "This is the content of the notification. This is the content of the notification. This is the content of the notification."
- ));
- }
-
- private void ShowInfoNotification(object? sender, RoutedEventArgs e)
- {
- _basicManager?.Show(new Notification(
- type: NotificationType.Information,
- title: "Notification Title",
- content: "This is the content of the notification. This is the content of the notification. This is the content of the notification."
- ));
- }
-
- private void ShowWarningNotification(object? sender, RoutedEventArgs e)
- {
- _basicManager?.Show(new Notification(
- type: NotificationType.Warning,
- title: "Notification Title",
- content: "This is the content of the notification. This is the content of the notification. This is the content of the notification."
- ));
- }
-
- private void ShowErrorNotification(object? sender, RoutedEventArgs e)
- {
- _basicManager?.Show(new Notification(
- type: NotificationType.Error,
- title: "Notification Title",
- content: "This is the content of the notification. This is the content of the notification. This is the content of the notification."
- ));
- }
-
- private void ShowTopNotification(object? sender, RoutedEventArgs e)
- {
- _topManager?.Show(new Notification(
- title : "Notification Top",
- content : "Hello, AtomUI/Avalonia!"
- ));
- }
-
- private void ShowBottomNotification(object? sender, RoutedEventArgs e)
- {
- _bottomManager?.Show(new Notification(
- title : "Notification Bottom",
- content : "Hello, AtomUI/Avalonia!"
- ));
- }
-
- private void ShowTopLeftNotification(object? sender, RoutedEventArgs e)
- {
- _topLeftManager?.Show(new Notification(
- title : "Notification TopLeft",
- content : "Hello, AtomUI/Avalonia!"
- ));
- }
-
- private void ShowTopRightNotification(object? sender, RoutedEventArgs e)
- {
- _topRightManager?.Show(new Notification(
- title : "Notification TopRight",
- content : "Hello, AtomUI/Avalonia!"
- ));
- }
-
- private void ShowBottomLeftNotification(object? sender, RoutedEventArgs e)
- {
- _bottomLeftManager?.Show(new Notification(
- title : "Notification BottomLeft",
- content : "Hello, AtomUI/Avalonia!"
- ));
- }
-
- private void ShowBottomRightNotification(object? sender, RoutedEventArgs e)
- {
- _bottomRightManager?.Show(new Notification(
- title : "Notification BottomRight",
- content : "Hello, AtomUI/Avalonia!"
- ));
- }
-
-
- private void ShowCustomIconNotification(object? sender, RoutedEventArgs e)
- {
- _basicManager?.Show(new Notification(
- title: "Notification Title",
- content: "This is the content of the notification. This is the content of the notification. This is the content of the notification.",
- icon: new PathIcon()
- {
- Kind = "SettingOutlined"
- }
- ));
- }
-
- private void ShowProgressNotification(object? sender, RoutedEventArgs e)
- {
- _basicManager?.Show(new Notification(
- type: NotificationType.Information,
- title: "Notification Title",
- content: "This is the content of the notification. This is the content of the notification. This is the content of the notification.",
- showProgress:true
- ));
- }
+ public NotificationShowCase()
+ {
+ InitializeComponent();
+ HoverOptionGroup.OptionCheckedChanged += HandleHoverOptionGroupCheckedChanged;
+ }
+
+ private void HandleHoverOptionGroupCheckedChanged(object? sender, OptionCheckedChangedEventArgs args)
+ {
+ if (_basicManager is not null)
+ {
+ if (args.Index == 0)
+ _basicManager.IsPauseOnHover = true;
+ else
+ _basicManager.IsPauseOnHover = false;
+ }
+ }
+
+ protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
+ {
+ base.OnAttachedToVisualTree(e);
+ var topLevel = TopLevel.GetTopLevel(this);
+ _basicManager = new WindowNotificationManager(topLevel)
+ {
+ MaxItems = 3
+ };
+
+ _topLeftManager = new WindowNotificationManager(topLevel)
+ {
+ MaxItems = 3,
+ Position = NotificationPosition.TopLeft
+ };
+
+ _topManager = new WindowNotificationManager(topLevel)
+ {
+ Position = NotificationPosition.TopCenter,
+ MaxItems = 3
+ };
+
+ _topRightManager = new WindowNotificationManager(topLevel)
+ {
+ Position = NotificationPosition.TopRight,
+ MaxItems = 3
+ };
+
+ _bottomLeftManager = new WindowNotificationManager(topLevel)
+ {
+ Position = NotificationPosition.BottomLeft,
+ MaxItems = 3
+ };
+
+ _bottomManager = new WindowNotificationManager(topLevel)
+ {
+ Position = NotificationPosition.BottomCenter,
+ MaxItems = 3
+ };
+
+ _bottomRightManager = new WindowNotificationManager(topLevel)
+ {
+ Position = NotificationPosition.BottomRight,
+ MaxItems = 3
+ };
+ }
+
+ private void ShowSimpleNotification(object? sender, RoutedEventArgs e)
+ {
+ _basicManager?.Show(new Notification(
+ "Notification Title",
+ "Hello, AtomUI/Avalonia!"
+ ));
+ }
+
+ private void ShowNeverCloseNotification(object? sender, RoutedEventArgs e)
+ {
+ _basicManager?.Show(new Notification(
+ expiration: TimeSpan.Zero,
+ title: "Notification Title",
+ content:
+ "I will never close automatically. This is a purposely very very long description that has many many characters and words."
+ ));
+ }
+
+ private void ShowSuccessNotification(object? sender, RoutedEventArgs e)
+ {
+ _basicManager?.Show(new Notification(
+ type: NotificationType.Success,
+ title: "Notification Title",
+ content:
+ "This is the content of the notification. This is the content of the notification. This is the content of the notification."
+ ));
+ }
+
+ private void ShowInfoNotification(object? sender, RoutedEventArgs e)
+ {
+ _basicManager?.Show(new Notification(
+ type: NotificationType.Information,
+ title: "Notification Title",
+ content:
+ "This is the content of the notification. This is the content of the notification. This is the content of the notification."
+ ));
+ }
+
+ private void ShowWarningNotification(object? sender, RoutedEventArgs e)
+ {
+ _basicManager?.Show(new Notification(
+ type: NotificationType.Warning,
+ title: "Notification Title",
+ content:
+ "This is the content of the notification. This is the content of the notification. This is the content of the notification."
+ ));
+ }
+
+ private void ShowErrorNotification(object? sender, RoutedEventArgs e)
+ {
+ _basicManager?.Show(new Notification(
+ type: NotificationType.Error,
+ title: "Notification Title",
+ content:
+ "This is the content of the notification. This is the content of the notification. This is the content of the notification."
+ ));
+ }
+
+ private void ShowTopNotification(object? sender, RoutedEventArgs e)
+ {
+ _topManager?.Show(new Notification(
+ "Notification Top",
+ "Hello, AtomUI/Avalonia!"
+ ));
+ }
+
+ private void ShowBottomNotification(object? sender, RoutedEventArgs e)
+ {
+ _bottomManager?.Show(new Notification(
+ "Notification Bottom",
+ "Hello, AtomUI/Avalonia!"
+ ));
+ }
+
+ private void ShowTopLeftNotification(object? sender, RoutedEventArgs e)
+ {
+ _topLeftManager?.Show(new Notification(
+ "Notification TopLeft",
+ "Hello, AtomUI/Avalonia!"
+ ));
+ }
+
+ private void ShowTopRightNotification(object? sender, RoutedEventArgs e)
+ {
+ _topRightManager?.Show(new Notification(
+ "Notification TopRight",
+ "Hello, AtomUI/Avalonia!"
+ ));
+ }
+
+ private void ShowBottomLeftNotification(object? sender, RoutedEventArgs e)
+ {
+ _bottomLeftManager?.Show(new Notification(
+ "Notification BottomLeft",
+ "Hello, AtomUI/Avalonia!"
+ ));
+ }
+
+ private void ShowBottomRightNotification(object? sender, RoutedEventArgs e)
+ {
+ _bottomRightManager?.Show(new Notification(
+ "Notification BottomRight",
+ "Hello, AtomUI/Avalonia!"
+ ));
+ }
+
+ private void ShowCustomIconNotification(object? sender, RoutedEventArgs e)
+ {
+ _basicManager?.Show(new Notification(
+ "Notification Title",
+ "This is the content of the notification. This is the content of the notification. This is the content of the notification.",
+ icon: new PathIcon
+ {
+ Kind = "SettingOutlined"
+ }
+ ));
+ }
+
+ private void ShowProgressNotification(object? sender, RoutedEventArgs e)
+ {
+ _basicManager?.Show(new Notification(
+ type: NotificationType.Information,
+ title: "Notification Title",
+ content:
+ "This is the content of the notification. This is the content of the notification. This is the content of the notification.",
+ showProgress: true
+ ));
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/NumberUpDownShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/NumberUpDownShowCase.axaml
index f255e07..2bbb74c 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/NumberUpDownShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/NumberUpDownShowCase.axaml
@@ -5,14 +5,14 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
-
+
@@ -49,7 +49,8 @@
-
+
-
+ Watermark="Enter your value" />
-
+
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/NumberUpDownShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/NumberUpDownShowCase.axaml.cs
index 09e50d1..2379bcc 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/NumberUpDownShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/NumberUpDownShowCase.axaml.cs
@@ -4,9 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class NumberUpDownShowCase : UserControl
{
- public NumberUpDownShowCase()
- {
- InitializeComponent();
- }
-
+ public NumberUpDownShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/Overview.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/Overview.axaml
index e3597ca..8e686ed 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/Overview.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/Overview.axaml
@@ -3,14 +3,12 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:Avalonia.Markup.Xaml.Converters;assembly=Avalonia.Markup.Xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="1000"
d:DesignWidth="1920"
mc:Ignorable="d">
-
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/Overview.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/Overview.axaml.cs
index 0acfd98..40a4037 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/Overview.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/Overview.axaml.cs
@@ -12,32 +12,32 @@ public partial class Overview : UserControl
public string MainInstall { get; set; } = "dotnet add package AtomUI --version 11.0.7";
public string MainStyle { get; set; } = """
-
-
-
-""";
+
+
+
+ """;
public string ColorPickerInstall { get; set; } = "dotnet add package AtomUI.ColorPicker --version 11.0.7";
public string ColorPickerStyle { get; set; } = """
-
-
-
-""";
+
+
+
+ """;
public string DataGridInstall { get; set; } = "dotnet add package AtomUI.DataGrid --version 11.0.7";
public string DataGridStyle { get; set; } = """
-
-
-
-""";
+
+
+
+ """;
public string TreeDataGridInstall { get; set; } = "dotnet add package AtomUI.TreeDataGrid --version 11.0.7";
public string TreeDataGridStyle { get; set; } = """
-
-
-
-""";
+
+
+
+ """;
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/PaginationShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/PaginationShowCase.axaml
index 1907056..046d973 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/PaginationShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/PaginationShowCase.axaml
@@ -1,11 +1,9 @@
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/PaginationShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/PaginationShowCase.axaml.cs
index 5b324cc..34080ce 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/PaginationShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/PaginationShowCase.axaml.cs
@@ -4,8 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class PaginationShowCase : UserControl
{
- public PaginationShowCase()
- {
- InitializeComponent();
- }
+ public PaginationShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/PaletteShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/PaletteShowCase.axaml.cs
index 595d318..10e8e31 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/PaletteShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/PaletteShowCase.axaml.cs
@@ -1,7 +1,7 @@
+using AtomUI.Demo.Desktop.ViewModels;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.Threading;
-using AtomUI.Demo.Desktop.ViewModels;
namespace AtomUI.Demo.Desktop.ShowCase;
@@ -12,14 +12,11 @@ public partial class PaletteShowCase : UserControl
InitializeComponent();
}
- protected override async void OnApplyTemplate(TemplateAppliedEventArgs e)
+ protected override async void OnApplyTemplate(TemplateAppliedEventArgs e)
{
base.OnApplyTemplate(e);
- PaletteDemoViewModel vm = new PaletteDemoViewModel();
- await Dispatcher.UIThread.InvokeAsync(() =>
- {
- vm.InitializeResources();
- });
+ var vm = new PaletteDemoViewModel();
+ await Dispatcher.UIThread.InvokeAsync(() => { vm.InitializeResources(); });
DataContext = vm;
}
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/PopupConfirmShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/PopupConfirmShowCase.axaml
index b9add2f..74a9f20 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/PopupConfirmShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/PopupConfirmShowCase.axaml
@@ -5,10 +5,10 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
-
+
-
+
Delete
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/PopupConfirmShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/PopupConfirmShowCase.axaml.cs
index ef28018..3b418fb 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/PopupConfirmShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/PopupConfirmShowCase.axaml.cs
@@ -4,8 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class PopupConfirmShowCase : UserControl
{
- public PopupConfirmShowCase()
- {
- InitializeComponent();
- }
+ public PopupConfirmShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/ProgressBarShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/ProgressBarShowCase.axaml
index 0f9133d..eeaac1f 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/ProgressBarShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/ProgressBarShowCase.axaml
@@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
@@ -118,7 +117,8 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -424,7 +430,8 @@
-
+
-
+
-
+
@@ -576,7 +585,8 @@
-
+
@@ -618,7 +628,8 @@
-
+
@@ -660,7 +671,8 @@
-
+
ProgressValueProperty =
+ AvaloniaProperty.Register(nameof(ProgressValue), 30);
- public LinearGradientBrush ThreeStopsGradientStrokeColor { get; set; }
+ public static readonly StyledProperty ToggleDisabledTextProperty =
+ AvaloniaProperty.Register(nameof(ToggleDisabledText), "Disable");
- public List StepsChunkBrushes { get; set; }
+ public static readonly StyledProperty ToggleStatusProperty =
+ AvaloniaProperty.Register(nameof(ToggleStatus), true);
- public PercentPosition InnerStartPercentPosition { get; set; }
- public PercentPosition InnerCenterPercentPosition { get; set; }
- public PercentPosition InnerEndPercentPosition { get; set; }
-
- public PercentPosition OutterStartPercentPosition { get; set; }
- public PercentPosition OutterCenterPercentPosition { get; set; }
- public PercentPosition OutterEndPercentPosition { get; set; }
+ public ProgressBarShowCase()
+ {
+ InitializeComponent();
+ DataContext = this;
- public static readonly StyledProperty ProgressValueProperty =
- AvaloniaProperty.Register(nameof(ProgressValue), 30);
-
- public static readonly StyledProperty ToggleDisabledTextProperty =
- AvaloniaProperty.Register(nameof(ToggleDisabledText), "Disable");
-
- public static readonly StyledProperty ToggleStatusProperty =
- AvaloniaProperty.Register(nameof(ToggleStatus), true);
-
- public double ProgressValue
- {
- get => GetValue(ProgressValueProperty);
- set => SetValue(ProgressValueProperty, value);
- }
-
- public string ToggleDisabledText
- {
- get => GetValue(ToggleDisabledTextProperty);
- set => SetValue(ToggleDisabledTextProperty, value);
- }
-
- public bool ToggleStatus
- {
- get => GetValue(ToggleStatusProperty);
- set => SetValue(ToggleStatusProperty, value);
- }
-
- public ProgressBarShowCase()
- {
- InitializeComponent();
- DataContext = this;
+ TwoStopsGradientStrokeColor = new LinearGradientBrush
+ {
+ GradientStops =
+ {
+ new GradientStop(Color.Parse("#108ee9"), 0),
+ new GradientStop(Color.Parse("#87d068"), 1)
+ }
+ };
+ ThreeStopsGradientStrokeColor = new LinearGradientBrush
+ {
+ GradientStops =
+ {
+ new GradientStop(Color.Parse("#87d068"), 0),
+ new GradientStop(Color.Parse("#ffe58f"), 0.5),
+ new GradientStop(Color.Parse("#ffccc7"), 1)
+ }
+ };
+ StepsChunkBrushes = new List
+ {
+ new SolidColorBrush(Colors.Green),
+ new SolidColorBrush(Colors.Green),
+ new SolidColorBrush(Colors.Red)
+ };
- TwoStopsGradientStrokeColor = new LinearGradientBrush()
- {
- GradientStops =
- {
- new GradientStop(Color.Parse("#108ee9"), 0),
- new GradientStop(Color.Parse("#87d068"), 1)
- }
- };
- ThreeStopsGradientStrokeColor = new LinearGradientBrush()
- {
- GradientStops =
- {
- new GradientStop(Color.Parse("#87d068"), 0),
- new GradientStop(Color.Parse("#ffe58f"), 0.5),
- new GradientStop(Color.Parse("#ffccc7"), 1)
- }
- };
- StepsChunkBrushes = new List()
- {
- new SolidColorBrush(Colors.Green),
- new SolidColorBrush(Colors.Green),
- new SolidColorBrush(Colors.Red)
- };
+ InnerStartPercentPosition = new PercentPosition
+ {
+ IsInner = true,
+ Alignment = LinePercentAlignment.Start
+ };
+ InnerCenterPercentPosition = new PercentPosition
+ {
+ IsInner = true,
+ Alignment = LinePercentAlignment.Center
+ };
+ InnerEndPercentPosition = new PercentPosition
+ {
+ IsInner = true,
+ Alignment = LinePercentAlignment.End
+ };
- InnerStartPercentPosition = new PercentPosition()
- {
- IsInner = true,
- Alignment = LinePercentAlignment.Start
- };
- InnerCenterPercentPosition = new PercentPosition()
- {
- IsInner = true,
- Alignment = LinePercentAlignment.Center
- };
- InnerEndPercentPosition = new PercentPosition()
- {
- IsInner = true,
- Alignment = LinePercentAlignment.End
- };
-
- OutterStartPercentPosition = new PercentPosition()
- {
- IsInner = false,
- Alignment = LinePercentAlignment.Start
- };
- OutterCenterPercentPosition = new PercentPosition()
- {
- IsInner = false,
- Alignment = LinePercentAlignment.Center
- };
- OutterEndPercentPosition = new PercentPosition()
- {
- IsInner = false,
- Alignment = LinePercentAlignment.End
- };
- }
+ OutterStartPercentPosition = new PercentPosition
+ {
+ IsInner = false,
+ Alignment = LinePercentAlignment.Start
+ };
+ OutterCenterPercentPosition = new PercentPosition
+ {
+ IsInner = false,
+ Alignment = LinePercentAlignment.Center
+ };
+ OutterEndPercentPosition = new PercentPosition
+ {
+ IsInner = false,
+ Alignment = LinePercentAlignment.End
+ };
+ }
- public void AddProgressValue()
- {
- var value = ProgressValue;
- value += 10;
- ProgressValue = Math.Min(value, 100);
- }
+ public LinearGradientBrush TwoStopsGradientStrokeColor { get; set; }
- public void SubProgressValue()
- {
- var value = ProgressValue;
- value -= 10;
- ProgressValue = Math.Max(value, 0);
- }
+ public LinearGradientBrush ThreeStopsGradientStrokeColor { get; set; }
- public void ToggleEnabledStatus()
- {
- ToggleStatus = !ToggleStatus;
- if (ToggleStatus) {
- ToggleDisabledText = "Disable";
- } else {
- ToggleDisabledText = "Enable";
- }
- }
+ public List StepsChunkBrushes { get; set; }
+
+ public PercentPosition InnerStartPercentPosition { get; set; }
+ public PercentPosition InnerCenterPercentPosition { get; set; }
+ public PercentPosition InnerEndPercentPosition { get; set; }
+
+ public PercentPosition OutterStartPercentPosition { get; set; }
+ public PercentPosition OutterCenterPercentPosition { get; set; }
+ public PercentPosition OutterEndPercentPosition { get; set; }
+
+ public double ProgressValue
+ {
+ get => GetValue(ProgressValueProperty);
+ set => SetValue(ProgressValueProperty, value);
+ }
+
+ public string ToggleDisabledText
+ {
+ get => GetValue(ToggleDisabledTextProperty);
+ set => SetValue(ToggleDisabledTextProperty, value);
+ }
+
+ public bool ToggleStatus
+ {
+ get => GetValue(ToggleStatusProperty);
+ set => SetValue(ToggleStatusProperty, value);
+ }
+
+ public void AddProgressValue()
+ {
+ var value = ProgressValue;
+ value += 10;
+ ProgressValue = Math.Min(value, 100);
+ }
+
+ public void SubProgressValue()
+ {
+ var value = ProgressValue;
+ value -= 10;
+ ProgressValue = Math.Max(value, 0);
+ }
+
+ public void ToggleEnabledStatus()
+ {
+ ToggleStatus = !ToggleStatus;
+ if (ToggleStatus)
+ ToggleDisabledText = "Disable";
+ else
+ ToggleDisabledText = "Enable";
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/RadioButtonShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/RadioButtonShowCase.axaml
index e993078..1eb0b32 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/RadioButtonShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/RadioButtonShowCase.axaml
@@ -140,7 +140,8 @@
-
+
Hangzhou
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/RadioButtonShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/RadioButtonShowCase.axaml.cs
index cc773b1..65db973 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/RadioButtonShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/RadioButtonShowCase.axaml.cs
@@ -4,30 +4,26 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class RadioButtonShowCase : UserControl
{
- protected List CheckRadios { get; set; }
+ public RadioButtonShowCase()
+ {
+ CheckRadios = new List
+ {
+ "ToggleDisabledRadioUnChecked",
+ "ToggleDisabledRadioChecked"
+ };
+ InitializeComponent();
+ }
- public RadioButtonShowCase()
- {
- CheckRadios = new List()
- {
- "ToggleDisabledRadioUnChecked",
- "ToggleDisabledRadioChecked"
- };
- InitializeComponent();
- }
-
- public static void ToggleDisabledStatus(object arg)
- {
- var btn = (arg as Button)!;
- var stackPanel = btn.Parent as StackPanel;
- var radioBtn1 = stackPanel?.FindControl("ToggleDisabledRadioUnChecked");
- var radioBtn2 = stackPanel?.FindControl("ToggleDisabledRadioChecked");
- if (radioBtn1 != null) {
- radioBtn1.IsEnabled = !radioBtn1.IsEnabled;
- }
+ protected List CheckRadios { get; set; }
- if (radioBtn2 != null) {
- radioBtn2.IsEnabled = !radioBtn2.IsEnabled;
- }
- }
+ public static void ToggleDisabledStatus(object arg)
+ {
+ var btn = (arg as Button)!;
+ var stackPanel = btn.Parent as StackPanel;
+ var radioBtn1 = stackPanel?.FindControl("ToggleDisabledRadioUnChecked");
+ var radioBtn2 = stackPanel?.FindControl("ToggleDisabledRadioChecked");
+ if (radioBtn1 != null) radioBtn1.IsEnabled = !radioBtn1.IsEnabled;
+
+ if (radioBtn2 != null) radioBtn2.IsEnabled = !radioBtn2.IsEnabled;
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/SegmentedShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/SegmentedShowCase.axaml
index 346cef2..fdcb800 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/SegmentedShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/SegmentedShowCase.axaml
@@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
@@ -22,7 +21,8 @@
-
+
123
@@ -51,7 +51,8 @@
-
+
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/SegmentedShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/SegmentedShowCase.axaml.cs
index dcff03f..6033ca1 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/SegmentedShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/SegmentedShowCase.axaml.cs
@@ -4,9 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class SegmentedShowCase : UserControl
{
- public SegmentedShowCase()
- {
- InitializeComponent();
- }
-
+ public SegmentedShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/SeparatorShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/SeparatorShowCase.axaml
index e9b7ca9..34c1380 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/SeparatorShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/SeparatorShowCase.axaml
@@ -5,10 +5,10 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
-
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.
@@ -24,7 +24,8 @@
-
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.
@@ -65,7 +66,8 @@
-
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/SeparatorShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/SeparatorShowCase.axaml.cs
index 8e16e19..ae05067 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/SeparatorShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/SeparatorShowCase.axaml.cs
@@ -4,9 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class SeparatorShowCase : UserControl
{
- public SeparatorShowCase()
- {
- InitializeComponent();
- }
-
+ public SeparatorShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/SliderShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/SliderShowCase.axaml
index b58a59c..4fd242a 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/SliderShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/SliderShowCase.axaml
@@ -5,10 +5,10 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
-
+
-
+
-
+
included=true
?> SliderMarksProperty =
- AvaloniaProperty.Register?>(nameof(SliderMarks));
-
- public static readonly StyledProperty NormalDisabledProperty =
- AvaloniaProperty.Register(nameof(NormalEnabled), true);
-
- public AvaloniaList? SliderMarks {
- get => GetValue(SliderMarksProperty);
- set => SetValue(SliderMarksProperty, value);
- }
-
- public bool NormalEnabled {
- get => GetValue(NormalDisabledProperty);
- set => SetValue(NormalDisabledProperty, value);
- }
-
- public SliderShowCase()
- {
- InitializeComponent();
- SliderMarks = new AvaloniaList();
- SliderMarks.Add(new SliderMark("0°C", 0));
- SliderMarks.Add(new SliderMark("26°C", 26));
- SliderMarks.Add(new SliderMark("37°C", 37));
- SliderMarks.Add(new SliderMark("100°C", 100)
- {
- LabelFontWeight = FontWeight.Bold,
- LabelBrush = new SolidColorBrush(Colors.Red)
- });
- DataContext = this;
- }
-
+ public static readonly StyledProperty?> SliderMarksProperty =
+ AvaloniaProperty.Register?>(nameof(SliderMarks));
+
+ public static readonly StyledProperty NormalDisabledProperty =
+ AvaloniaProperty.Register(nameof(NormalEnabled), true);
+
+ public SliderShowCase()
+ {
+ InitializeComponent();
+ SliderMarks = new AvaloniaList();
+ SliderMarks.Add(new SliderMark("0°C", 0));
+ SliderMarks.Add(new SliderMark("26°C", 26));
+ SliderMarks.Add(new SliderMark("37°C", 37));
+ SliderMarks.Add(new SliderMark("100°C", 100)
+ {
+ LabelFontWeight = FontWeight.Bold,
+ LabelBrush = new SolidColorBrush(Colors.Red)
+ });
+ DataContext = this;
+ }
+
+ public AvaloniaList? SliderMarks
+ {
+ get => GetValue(SliderMarksProperty);
+ set => SetValue(SliderMarksProperty, value);
+ }
+
+ public bool NormalEnabled
+ {
+ get => GetValue(NormalDisabledProperty);
+ set => SetValue(NormalDisabledProperty, value);
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/SplitButtonShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/SplitButtonShowCase.axaml
index 5af0aa4..88f5739 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/SplitButtonShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/SplitButtonShowCase.axaml
@@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
@@ -27,7 +26,8 @@
-
+
-
+
Tag 1
Link
@@ -27,7 +27,8 @@
-
+
-
+
-
+
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/TagShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/TagShowCase.axaml.cs
index 1c32713..a0cec81 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/TagShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/TagShowCase.axaml.cs
@@ -4,9 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class TagShowCase : UserControl
{
- public TagShowCase()
- {
- InitializeComponent();
- }
-
+ public TagShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/TimePickerShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/TimePickerShowCase.axaml
index a8daf4d..9c90f12 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/TimePickerShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/TimePickerShowCase.axaml
@@ -5,14 +5,15 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
-
+
-
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/TimelineShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/TimelineShowCase.axaml.cs
index 7076620..dd76f87 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/TimelineShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/TimelineShowCase.axaml.cs
@@ -4,9 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class TimelineShowCase : UserControl
{
- public TimelineShowCase()
- {
- InitializeComponent();
- }
-
+ public TimelineShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/TitleBarShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/TitleBarShowCase.axaml
index a403f23..a3920f3 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/TitleBarShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/TitleBarShowCase.axaml
@@ -1,11 +1,9 @@
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/TitleBarShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/TitleBarShowCase.axaml.cs
index 1358878..533f12a 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/TitleBarShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/TitleBarShowCase.axaml.cs
@@ -4,8 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class TitleBarShowCase : UserControl
{
- public TitleBarShowCase()
- {
- InitializeComponent();
- }
+ public TitleBarShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/ToolBarShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/ToolBarShowCase.axaml
index 5edbf0d..141cb8a 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/ToolBarShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/ToolBarShowCase.axaml
@@ -1,11 +1,9 @@
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/ToolBarShowCase.axaml.cs b/samples/AtomUI.Demo.Desktop/ShowCase/ToolBarShowCase.axaml.cs
index a404a30..4771d92 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/ToolBarShowCase.axaml.cs
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/ToolBarShowCase.axaml.cs
@@ -4,8 +4,8 @@ namespace AtomUI.Demo.Desktop.ShowCase;
public partial class ToolBarShowCase : UserControl
{
- public ToolBarShowCase()
- {
- InitializeComponent();
- }
+ public ToolBarShowCase()
+ {
+ InitializeComponent();
+ }
}
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/ShowCase/TooltipShowCase.axaml b/samples/AtomUI.Demo.Desktop/ShowCase/TooltipShowCase.axaml
index 0eba683..8e5e641 100644
--- a/samples/AtomUI.Demo.Desktop/ShowCase/TooltipShowCase.axaml
+++ b/samples/AtomUI.Demo.Desktop/ShowCase/TooltipShowCase.axaml
@@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
@@ -256,7 +255,8 @@
-
+
-
+
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/Themes/ToggleButton.axaml b/samples/AtomUI.Demo.Desktop/Themes/ToggleButton.axaml
index b6cd640..96805b5 100644
--- a/samples/AtomUI.Demo.Desktop/Themes/ToggleButton.axaml
+++ b/samples/AtomUI.Demo.Desktop/Themes/ToggleButton.axaml
@@ -22,4 +22,4 @@
-
+
\ No newline at end of file
diff --git a/samples/AtomUI.Demo.Desktop/Utils/EnumExtension.cs b/samples/AtomUI.Demo.Desktop/Utils/EnumExtension.cs
index 96393e4..65750e4 100644
--- a/samples/AtomUI.Demo.Desktop/Utils/EnumExtension.cs
+++ b/samples/AtomUI.Demo.Desktop/Utils/EnumExtension.cs
@@ -1,28 +1,26 @@
using Avalonia.Markup.Xaml;
-namespace AtomUI.Demo.Desktop.Utils
+namespace AtomUI.Demo.Desktop.Utils;
+
+///
+/// Xaml markup to get the enum values.
+///
+/// TODO 优化性能时可以考虑缓存类型和列表
+public class EnumExtension : MarkupExtension
{
- ///
- /// Xaml markup to get the enum values.
- ///
- /// TODO 优化性能时可以考虑缓存类型和列表
- public class EnumExtension : MarkupExtension
+ public EnumExtension(Type type)
{
- [ConstructorArgument(nameof(Type))]
- public Type Type { get; set; }
-
- public EnumExtension(Type type)
- {
- Type = type;
- }
-
- public override object ProvideValue(IServiceProvider serviceProvider)
- {
- // Issue I7:
- // Array can not perform well for Items of ListBox.
- // Version : 11.0.0-preview4
- // By nlb at 2023.3.28.
- return Enum.GetValues(Type).OfType