From 92aba94e78ceb17f27ab8d6c22f48fd76711517e Mon Sep 17 00:00:00 2001 From: Heiko <61519853+htcfreek@users.noreply.github.com> Date: Mon, 27 Dec 2021 19:17:54 +0100 Subject: [PATCH] [ColorPicker Editor] Adjust color menu: Hex input improvements (#15074) * adding max length to hex textbox * support hex code without hashtag * new method * Only user typed hashtag in text box * code change * set hex box casing to upper * improve hashtag handling * fix spelling and add comment * spell fix * fix condition and switch hex to lower case --- .github/actions/spell-check/expect.txt | 1 + .../Controls/ColorPickerControl.xaml | 4 +- .../Controls/ColorPickerControl.xaml.cs | 41 ++++++++++++++++--- 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index da889c129d..0f7cbe60e8 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -661,6 +661,7 @@ HARDWAREINPUT hashcode Hashset Hashtable +hashtag HASHVAL hbitmap hbmp diff --git a/src/modules/colorPicker/ColorPickerUI/Controls/ColorPickerControl.xaml b/src/modules/colorPicker/ColorPickerUI/Controls/ColorPickerControl.xaml index f1fedccc82..dc522149db 100644 --- a/src/modules/colorPicker/ColorPickerUI/Controls/ColorPickerControl.xaml +++ b/src/modules/colorPicker/ColorPickerUI/Controls/ColorPickerControl.xaml @@ -436,7 +436,9 @@ AutomationProperties.Name="{x:Static p:Resources.Hex_value}" GotKeyboardFocus="HexCode_GotKeyboardFocus" TextChanged="HexCode_TextChanged" - TextWrapping="Wrap" /> + TextWrapping="Wrap" + MaxLength="7" + CharacterCasing="Lower" />