From 9588b8cbb780a22bf2e1ea068acfe79f60934495 Mon Sep 17 00:00:00 2001 From: Takeshi Date: Sat, 24 Jan 2026 13:09:58 -0700 Subject: [PATCH] fix: TextBox template uses Grid instead of StackPanel for proper height stretching The TextBox template was using StackPanel to wrap the content, which doesn't stretch children to fill available space. This caused multiline TextBoxes with explicit Height to only display ~36px of editable area instead of the full height. Changes: - Replace outer StackPanel with Grid (RowDefinitions='Auto,*') - Replace inner StackPanel with Grid (RowDefinitions='*,Auto') - Add VerticalAlignment='Stretch' to Border - Remove hard-coded Height binding (let it stretch naturally) - Update style selector from StackPanel to Grid This fixes issues when using TextBox with AcceptsReturn=true and explicit Height for multiline text editing scenarios. --- src/ShadUI/Controls/TextBox/TextBox.axaml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/ShadUI/Controls/TextBox/TextBox.axaml b/src/ShadUI/Controls/TextBox/TextBox.axaml index 13292079..3dce58ef 100644 --- a/src/ShadUI/Controls/TextBox/TextBox.axaml +++ b/src/ShadUI/Controls/TextBox/TextBox.axaml @@ -132,22 +132,26 @@ - + + - - + + + @@ -241,6 +245,7 @@ - + - + @@ -283,7 +288,7 @@ -