diff --git a/src/Core/src/Handlers/Entry/EntryHandler.Windows.cs b/src/Core/src/Handlers/Entry/EntryHandler.Windows.cs index dc615f236665..0461d7120664 100644 --- a/src/Core/src/Handlers/Entry/EntryHandler.Windows.cs +++ b/src/Core/src/Handlers/Entry/EntryHandler.Windows.cs @@ -62,8 +62,10 @@ public static void MapReturnType(EntryHandler handler, IEntry entry) [MissingMapper] public static void MapClearButtonVisibility(IViewHandler handler, IEntry entry) { } - [MissingMapper] - public static void MapCharacterSpacing(IViewHandler handler, IEntry entry) { } + public static void MapCharacterSpacing(EntryHandler handler, IEntry entry) + { + handler.NativeView?.UpdateCharacterSpacing(entry); + } [MissingMapper] public static void MapKeyboard(IViewHandler handler, IEntry entry) { } diff --git a/src/Core/src/Platform/Windows/TextBoxExtensions.cs b/src/Core/src/Platform/Windows/TextBoxExtensions.cs index 1e76d9a7e9ec..fe71fdd0ef47 100644 --- a/src/Core/src/Platform/Windows/TextBoxExtensions.cs +++ b/src/Core/src/Platform/Windows/TextBoxExtensions.cs @@ -30,12 +30,17 @@ public static void UpdateTextColor(this MauiTextBox textBox, ITextStyle textStyl textBox.ForegroundFocusBrush = brush; } + public static void UpdateCharacterSpacing(this MauiTextBox textBox, IEntry entry) + { + textBox.CharacterSpacing = entry.CharacterSpacing.ToEm(); + } + public static void UpdateReturnType(this MauiTextBox textBox, IEntry entry) { textBox.InputScope = entry.ReturnType.ToNative(); - } + } - public static void UpdatePlaceholder(this MauiTextBox textBox, IEditor editor) + public static void UpdatePlaceholder(this MauiTextBox textBox, IEditor editor) { textBox.PlaceholderText = editor.Placeholder ?? string.Empty; } @@ -45,7 +50,7 @@ public static void UpdatePlaceholder(this MauiTextBox textBox, IEntry entry) textBox.PlaceholderText = entry.Placeholder ?? string.Empty; } - public static void UpdateFont(this MauiTextBox nativeControl, IText text, IFontManager fontManager) => + public static void UpdateFont(this MauiTextBox nativeControl, IText text, IFontManager fontManager) => nativeControl.UpdateFont(text.Font, fontManager); public static void UpdateFont(this MauiTextBox nativeControl, Font font, IFontManager fontManager) @@ -91,4 +96,4 @@ public static void UpdateMaxLength(this MauiTextBox textBox, IEntry entry) textBox.Text = currentControlText.Substring(0, maxLength); } } -} +} \ No newline at end of file