fix: TextBox template uses Grid instead of StackPanel for proper height stretching#67
Open
iwatakeshi wants to merge 1 commit intoaccntech:mainfrom
Open
fix: TextBox template uses Grid instead of StackPanel for proper height stretching#67iwatakeshi wants to merge 1 commit intoaccntech:mainfrom
iwatakeshi wants to merge 1 commit intoaccntech:mainfrom
Conversation
…ht 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the
TextBox.axamlcontrol template to improve layout flexibility and ensure child elements can stretch to fill available space. The main change is replacingStackPanelcontainers withGrid, allowing for better alignment and sizing of the text box content and associated elements.Layout improvements:
StackPanelwithGridas the root container in the control template, enabling content to stretch vertically and better utilize available space.DataValidationErrorscontainer to use aGridwith defined row structure, allowing theBorderandHintelements to align and stretch appropriately. [1] [2]Style adjustments:
StackPaneltoGridto ensure the cursor style is applied correctly to the new layout container.