Skip to content

TextBox height changes when text is entered if PlaceholderText is set #10378

@g0g8rz

Description

@g0g8rz

Describe the bug

If you have a TextBox in a Auto-sizing grid row (and perhaps other situations) and this TextBox has PlaceholderText set, the TextBox will resize slightly when real text is entered.

Steps to reproduce the bug

Create a Grid with a textbox (code example below) and set PlaceholderText. Then run the code and enter text into the box.

Expected behavior

Height to remain the same

Screenshots

TextBox-PlaceholderText-Height-but.mp4

NuGet package version

WinUI 3 - Windows App SDK 1.6.5: 1.6.250205002

Windows version

Windows 11 (23H2): Build 22631

Additional context

Workaround is to set a MinHeight and the problem goes away

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions