diff --git a/demo/Semi.Avalonia.Demo.Desktop/Program.cs b/demo/Semi.Avalonia.Demo.Desktop/Program.cs index 63a313a..b2cd034 100644 --- a/demo/Semi.Avalonia.Demo.Desktop/Program.cs +++ b/demo/Semi.Avalonia.Demo.Desktop/Program.cs @@ -27,5 +27,6 @@ class Program public static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure() .UsePlatformDetect() + .With(new Win32PlatformOptions(){ UseCompositor = false}) .LogToTrace(); } diff --git a/demo/Semi.Avalonia.Demo/Pages/ButtonDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/ButtonDemo.axaml index db55b78..0d97d8c 100644 --- a/demo/Semi.Avalonia.Demo/Pages/ButtonDemo.axaml +++ b/demo/Semi.Avalonia.Demo/Pages/ButtonDemo.axaml @@ -1,12 +1,16 @@ - + x:Class="Semi.Avalonia.Demo.Pages.ButtonDemo" + xmlns="https://github.com/avaloniaui" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + d:DesignHeight="450" + d:DesignWidth="800" + mc:Ignorable="d"> + Light (Default) @@ -23,7 +27,12 @@ - + Borderless @@ -32,7 +41,49 @@ - + + + DropdownButton + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Semi.Avalonia/Controls/CaptionButtons.axaml b/src/Semi.Avalonia/Controls/CaptionButtons.axaml new file mode 100644 index 0000000..9017e8d --- /dev/null +++ b/src/Semi.Avalonia/Controls/CaptionButtons.axaml @@ -0,0 +1,3 @@ + + + diff --git a/src/Semi.Avalonia/Controls/Controls.axaml b/src/Semi.Avalonia/Controls/Controls.axaml index 494506a..13b75f8 100644 --- a/src/Semi.Avalonia/Controls/Controls.axaml +++ b/src/Semi.Avalonia/Controls/Controls.axaml @@ -7,6 +7,7 @@ + @@ -14,6 +15,7 @@ + @@ -32,12 +34,14 @@ + + diff --git a/src/Semi.Avalonia/Controls/DropdownButton.axaml b/src/Semi.Avalonia/Controls/DropdownButton.axaml new file mode 100644 index 0000000..c9e9cee --- /dev/null +++ b/src/Semi.Avalonia/Controls/DropdownButton.axaml @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Semi.Avalonia/Controls/SplitButton.axaml b/src/Semi.Avalonia/Controls/SplitButton.axaml new file mode 100644 index 0000000..5281171 --- /dev/null +++ b/src/Semi.Avalonia/Controls/SplitButton.axaml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Semi.Avalonia/Controls/TitleBar.axaml b/src/Semi.Avalonia/Controls/TitleBar.axaml new file mode 100644 index 0000000..9017e8d --- /dev/null +++ b/src/Semi.Avalonia/Controls/TitleBar.axaml @@ -0,0 +1,3 @@ + + + diff --git a/src/Semi.Avalonia/Themes/Light/DropdownButton.axaml b/src/Semi.Avalonia/Themes/Light/DropdownButton.axaml new file mode 100644 index 0000000..ffedda8 --- /dev/null +++ b/src/Semi.Avalonia/Themes/Light/DropdownButton.axaml @@ -0,0 +1,4 @@ + + + M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z + diff --git a/src/Semi.Avalonia/Themes/Light/Light.axaml b/src/Semi.Avalonia/Themes/Light/Light.axaml index 91891fc..dd9a3f1 100644 --- a/src/Semi.Avalonia/Themes/Light/Light.axaml +++ b/src/Semi.Avalonia/Themes/Light/Light.axaml @@ -12,6 +12,7 @@ + @@ -23,6 +24,7 @@ + diff --git a/src/Semi.Avalonia/Themes/Light/SplitButton.axaml b/src/Semi.Avalonia/Themes/Light/SplitButton.axaml new file mode 100644 index 0000000..8ef2922 --- /dev/null +++ b/src/Semi.Avalonia/Themes/Light/SplitButton.axaml @@ -0,0 +1,8 @@ + + + M20.5598 9.65618L12.7546 18.6322C12.3559 19.0906 11.644 19.0906 11.2453 18.6322L3.4401 9.65618C2.8773 9.00895 3.33701 8 4.19471 8L19.8052 8C20.6629 8 21.1226 9.00895 20.5598 9.65618Z + 1 +