From 127bd1446a2551be1bbb2210ff3816c42216ea12 Mon Sep 17 00:00:00 2001 From: rabbitism Date: Fri, 5 May 2023 02:21:33 +0800 Subject: [PATCH] feat: add validation errors to textbox. --- .../Pages/TextBoxDemo.axaml | 18 ++ .../Controls/DataValidationErrors.axaml | 2 +- src/Semi.Avalonia/Controls/TextBox.axaml | 197 +++++++++++------- .../Themes/Light/DataValidationErrors.axaml | 2 +- 4 files changed, 139 insertions(+), 80 deletions(-) diff --git a/demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml index a181a61..57bcb57 100644 --- a/demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml +++ b/demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml @@ -4,6 +4,7 @@ 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" + xmlns:system="clr-namespace:System;assembly=netstandard" d:DesignHeight="450" d:DesignWidth="800" mc:Ignorable="d"> @@ -41,6 +42,23 @@ InnerLeftContent="http://" InnerRightContent=".com" IsEnabled="False" /> + + + + + + + + + + diff --git a/src/Semi.Avalonia/Controls/DataValidationErrors.axaml b/src/Semi.Avalonia/Controls/DataValidationErrors.axaml index 781b90a..ee21df3 100644 --- a/src/Semi.Avalonia/Controls/DataValidationErrors.axaml +++ b/src/Semi.Avalonia/Controls/DataValidationErrors.axaml @@ -27,7 +27,7 @@ + + + + + + + - - + + + + + + diff --git a/src/Semi.Avalonia/Themes/Light/DataValidationErrors.axaml b/src/Semi.Avalonia/Themes/Light/DataValidationErrors.axaml index c319b1d..95dfb36 100644 --- a/src/Semi.Avalonia/Themes/Light/DataValidationErrors.axaml +++ b/src/Semi.Avalonia/Themes/Light/DataValidationErrors.axaml @@ -1,6 +1,6 @@ - +