From 45f3470d765d449d9357346d67381c13004c4300 Mon Sep 17 00:00:00 2001 From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com> Date: Sat, 6 May 2023 16:57:54 +0800 Subject: [PATCH] feat: add validation errors to ComboBox. --- .../Pages/DataValidationErrorsDemo.axaml | 2 + src/Semi.Avalonia/Controls/ComboBox.axaml | 209 +++++++++++------- 2 files changed, 126 insertions(+), 85 deletions(-) diff --git a/demo/Semi.Avalonia.Demo/Pages/DataValidationErrorsDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/DataValidationErrorsDemo.axaml index c00f897..df5f491 100644 --- a/demo/Semi.Avalonia.Demo/Pages/DataValidationErrorsDemo.axaml +++ b/demo/Semi.Avalonia.Demo/Pages/DataValidationErrorsDemo.axaml @@ -25,6 +25,8 @@ + AAA + BBB diff --git a/src/Semi.Avalonia/Controls/ComboBox.axaml b/src/Semi.Avalonia/Controls/ComboBox.axaml index 6e27881..4692226 100644 --- a/src/Semi.Avalonia/Controls/ComboBox.axaml +++ b/src/Semi.Avalonia/Controls/ComboBox.axaml @@ -36,7 +36,6 @@ - @@ -45,96 +44,99 @@ - - - - - - - - - - + + - - - - - - + x:Name="Background" + Grid.Column="0" + Grid.ColumnSpan="2" + MinHeight="{DynamicResource ComboBoxDefaultHeight}" + MinWidth="{DynamicResource ComboBoxThemeMinWidth}" + Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}" + CornerRadius="{TemplateBinding CornerRadius}" /> + + + + + + + + + + + + + + + + - - @@ -173,6 +175,25 @@ + + + + + + + + + + + +