From 668634fb613fad5bd2aa90bd8891ae2d882d46b5 Mon Sep 17 00:00:00 2001 From: rabbitism Date: Mon, 23 Jan 2023 14:57:40 +0800 Subject: [PATCH] feat: add NumericUpDown template. No resource is required in this control. --- .../Pages/NumericUpDownDemo.axaml | 34 +++++++++++++++++++ .../Pages/NumericUpDownDemo.axaml.cs | 18 ++++++++++ demo/Semi.Avalonia.Demo/Views/MainView.axaml | 3 ++ .../Controls/NumericUpDown.axaml | 34 +++++++++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 demo/Semi.Avalonia.Demo/Pages/NumericUpDownDemo.axaml create mode 100644 demo/Semi.Avalonia.Demo/Pages/NumericUpDownDemo.axaml.cs diff --git a/demo/Semi.Avalonia.Demo/Pages/NumericUpDownDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/NumericUpDownDemo.axaml new file mode 100644 index 0000000..2cbb6e0 --- /dev/null +++ b/demo/Semi.Avalonia.Demo/Pages/NumericUpDownDemo.axaml @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/demo/Semi.Avalonia.Demo/Pages/NumericUpDownDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/NumericUpDownDemo.axaml.cs new file mode 100644 index 0000000..7c05985 --- /dev/null +++ b/demo/Semi.Avalonia.Demo/Pages/NumericUpDownDemo.axaml.cs @@ -0,0 +1,18 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace Semi.Avalonia.Demo.Pages; + +public partial class NumericUpDownDemo : UserControl +{ + public NumericUpDownDemo() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + } +} \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo/Views/MainView.axaml b/demo/Semi.Avalonia.Demo/Views/MainView.axaml index ab1e725..b224975 100644 --- a/demo/Semi.Avalonia.Demo/Views/MainView.axaml +++ b/demo/Semi.Avalonia.Demo/Views/MainView.axaml @@ -48,6 +48,9 @@ + + + diff --git a/src/Semi.Avalonia/Controls/NumericUpDown.axaml b/src/Semi.Avalonia/Controls/NumericUpDown.axaml index 9017e8d..eab646d 100644 --- a/src/Semi.Avalonia/Controls/NumericUpDown.axaml +++ b/src/Semi.Avalonia/Controls/NumericUpDown.axaml @@ -1,3 +1,37 @@ + + + + + + + + + + +