From 60605de2c854f37a1fd8031cf89c372fd2892b9d Mon Sep 17 00:00:00 2001 From: Dong Bin <14807942+rabbitism@users.noreply.github.com> Date: Wed, 11 Sep 2024 18:47:42 +0800 Subject: [PATCH] Updates to FormItem label and A11y (#395) * feat: 1. add AccessKey support for form item. 2. Support label positioning for different content height. 3. polish demo. * feat: add a transparent background for label. --- demo/Ursa.Demo/Pages/FormDemo.axaml | 85 ++++++++----------- src/Ursa.Themes.Semi/Controls/Form.axaml | 59 +++++++++---- .../FormContentHeightToAlignmentConverter.cs | 36 ++++++++ .../FormContentHeightToMarginConverter.cs | 34 ++++++++ 4 files changed, 146 insertions(+), 68 deletions(-) create mode 100644 src/Ursa.Themes.Semi/Converters/FormContentHeightToAlignmentConverter.cs create mode 100644 src/Ursa.Themes.Semi/Converters/FormContentHeightToMarginConverter.cs diff --git a/demo/Ursa.Demo/Pages/FormDemo.axaml b/demo/Ursa.Demo/Pages/FormDemo.axaml index 5d63392..a6752e5 100644 --- a/demo/Ursa.Demo/Pages/FormDemo.axaml +++ b/demo/Ursa.Demo/Pages/FormDemo.axaml @@ -13,59 +13,42 @@ x:DataType="vm:FormDemoViewModel" mc:Ignorable="d"> - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + - -