diff --git a/demo/Semi.Avalonia.Demo/Pages/AutoCompleteBoxDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/AutoCompleteBoxDemo.axaml index 0e13eda..7fc2efb 100644 --- a/demo/Semi.Avalonia.Demo/Pages/AutoCompleteBoxDemo.axaml +++ b/demo/Semi.Avalonia.Demo/Pages/AutoCompleteBoxDemo.axaml @@ -26,29 +26,7 @@ - - - - - - - - - - - - + + + + + + + + + + + + + \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml index 488a8ff..3bf4425 100644 --- a/demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml +++ b/demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml @@ -4,71 +4,40 @@ 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" + xmlns:pages="clr-namespace:Semi.Avalonia.Demo.Pages" + d:DesignHeight="800" d:DesignWidth="800" mc:Ignorable="d"> + + + - - Ding - Otter - Husky - Mr. 17 - Cass - - - Ding - Otter - Husky - Mr. 17 - Cass - - - Ding - Otter - Husky - Mr. 17 - Cass - - - Ding - Otter - Husky - Mr. 17 - Cass - - - Ding - Otter - Husky - Mr. 17 - Cass - - - Ding - Otter - Husky - Mr. 17 - Cass - - - Ding - Otter - Husky - Mr. 17 - Cass - - - Ding - Otter - Husky - Mr. 17 - Cass - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml.cs index 80b05bc..3c8cba2 100644 --- a/demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml.cs +++ b/demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml.cs @@ -1,6 +1,6 @@ -using Avalonia; +using System.Collections.ObjectModel; using Avalonia.Controls; -using Avalonia.Markup.Xaml; +using CommunityToolkit.Mvvm.ComponentModel; namespace Semi.Avalonia.Demo.Pages; @@ -9,5 +9,11 @@ public partial class ComboBoxDemo : UserControl public ComboBoxDemo() { InitializeComponent(); + this.DataContext = new ComboBoxDemoViewModel(); } +} + +public class ComboBoxDemoViewModel : ObservableObject +{ + public ObservableCollection Items { get; set; } = ["Ding", "Otter", "Husky", "Mr.17", "Cass"]; } \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo/Pages/DatePickerDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/DatePickerDemo.axaml index 3baefe4..cb6c0df 100644 --- a/demo/Semi.Avalonia.Demo/Pages/DatePickerDemo.axaml +++ b/demo/Semi.Avalonia.Demo/Pages/DatePickerDemo.axaml @@ -14,5 +14,16 @@ + + + + + + + + + + + diff --git a/demo/Semi.Avalonia.Demo/Pages/NumericUpDownDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/NumericUpDownDemo.axaml index 64193c8..b249c23 100644 --- a/demo/Semi.Avalonia.Demo/Pages/NumericUpDownDemo.axaml +++ b/demo/Semi.Avalonia.Demo/Pages/NumericUpDownDemo.axaml @@ -4,62 +4,53 @@ 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:DesignHeight="800" d:DesignWidth="800" mc:Ignorable="d"> + + + + + + + + + + + + - - - + + + - - - + + + - - - + + + - - - - - - - \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo/Pages/SplitViewDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/SplitViewDemo.axaml index 38a6db3..b63b60c 100644 --- a/demo/Semi.Avalonia.Demo/Pages/SplitViewDemo.axaml +++ b/demo/Semi.Avalonia.Demo/Pages/SplitViewDemo.axaml @@ -14,11 +14,13 @@ Orientation="Vertical" Spacing="4"> diff --git a/demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml index ea43f84..c7fc021 100644 --- a/demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml +++ b/demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml @@ -5,23 +5,11 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:system="clr-namespace:System;assembly=netstandard" - d:DesignHeight="450" + d:DesignHeight="800" d:DesignWidth="800" mc:Ignorable="d"> - - - - - - - - - - - - @@ -54,6 +42,34 @@ InnerLeftContent="http://" InnerRightContent=".com" IsEnabled="False" /> + + + + + + + + + + + diff --git a/demo/Semi.Avalonia.Demo/Pages/TimePickerDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/TimePickerDemo.axaml index c4b3216..c0f7ec8 100644 --- a/demo/Semi.Avalonia.Demo/Pages/TimePickerDemo.axaml +++ b/demo/Semi.Avalonia.Demo/Pages/TimePickerDemo.axaml @@ -15,5 +15,16 @@ + + + + + + + + + + + diff --git a/demo/Semi.Avalonia.Demo/Pages/ToggleButtonDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/ToggleButtonDemo.axaml index 60e6019..d349fef 100644 --- a/demo/Semi.Avalonia.Demo/Pages/ToggleButtonDemo.axaml +++ b/demo/Semi.Avalonia.Demo/Pages/ToggleButtonDemo.axaml @@ -17,7 +17,7 @@ Success Warning Danger - Danger + Disabled @@ -32,7 +32,7 @@ Classes="Danger" IsChecked="True" IsEnabled="False"> - Danger + Disabled @@ -79,7 +79,7 @@ IsChecked="{x:Null}" IsEnabled="False" IsThreeState="True"> - Danger + Disabled diff --git a/src/Semi.Avalonia/Controls/ComboBox.axaml b/src/Semi.Avalonia/Controls/ComboBox.axaml index b59da08..1a05313 100644 --- a/src/Semi.Avalonia/Controls/ComboBox.axaml +++ b/src/Semi.Avalonia/Controls/ComboBox.axaml @@ -32,6 +32,7 @@ + @@ -41,6 +42,7 @@ + @@ -49,9 +51,8 @@ x:Name="Background" Grid.Column="0" Grid.ColumnSpan="3" - MinWidth="{DynamicResource ComboBoxThemeMinWidth}" - MinHeight="{DynamicResource ComboBoxDefaultHeight}" Background="{TemplateBinding Background}" + BackgroundSizing="{TemplateBinding BackgroundSizing}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" /> @@ -61,6 +62,7 @@ Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" + TextTrimming="CharacterEllipsis" Foreground="{TemplateBinding Foreground}" IsVisible="{TemplateBinding SelectionBoxItem, Converter={x:Static ObjectConverters.IsNull}}" @@ -147,10 +149,10 @@ - - diff --git a/src/Semi.Avalonia/Controls/DatePicker.axaml b/src/Semi.Avalonia/Controls/DatePicker.axaml index 7a3210a..515bc26 100644 --- a/src/Semi.Avalonia/Controls/DatePicker.axaml +++ b/src/Semi.Avalonia/Controls/DatePicker.axaml @@ -132,6 +132,7 @@ + @@ -145,7 +146,7 @@ Grid.ColumnSpan="2" Width="298" MinWidth="298" - MinHeight="{DynamicResource DateTimePickerButtonDefaultHeight}" + MinHeight="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{TemplateBinding Background}" @@ -165,7 +166,7 @@ ColumnDefinitions="78*,Auto,132*,Auto,78*"> @@ -255,10 +258,10 @@ - - diff --git a/src/Semi.Avalonia/Controls/DateTimePickerShared.axaml b/src/Semi.Avalonia/Controls/DateTimePickerShared.axaml index f18ddaf..6addc9c 100644 --- a/src/Semi.Avalonia/Controls/DateTimePickerShared.axaml +++ b/src/Semi.Avalonia/Controls/DateTimePickerShared.axaml @@ -6,7 +6,8 @@ - + + + @@ -149,7 +150,7 @@ Grid.ColumnSpan="2" Width="242" MinWidth="242" - MinHeight="{DynamicResource DateTimePickerButtonDefaultHeight}" + MinHeight="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{TemplateBinding Background}" @@ -171,7 +172,7 @@ VerticalAlignment="Stretch"> @@ -194,7 +194,7 @@ VerticalAlignment="Stretch"> @@ -217,7 +216,7 @@ VerticalAlignment="Stretch"> - -