Skip to content

AutoSuggestBox: PlaceholderText is not vertically centered anymore. #10317

@peymanr34

Description

@peymanr34

Describe the bug

There is a regression where PlaceholderText for the AutoSuggestBox is not properly aligned anymore. I noticed this while updating Microsoft.WindowsAppSDK in a small project from 1.5.240607001 to 1.6.250108002 (latest).

Steps to reproduce the bug

  1. Create a new Black App, Packaged (WinUI 3 in Desktop) project.

At the time of writing, the latest package version for Microsoft.WindowsAppSDK would be:

<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.250108002" />
  1. Modify the MainWindow.xaml:
<Grid Margin="5">
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <AutoSuggestBox
        Margin="5"
        PlaceholderText="Search for something here..."
        QueryIcon="Find" />
</Grid>
  1. You can see the PlaceholderText is not centered vertically:

PlaceholderText is not aligned as expected

But if you write something, the actual text will be aligned as expected:

But the actual Text is aligned correctly

Expected behavior

If you change the Microsoft.WindowsAppSDK package version to 1.5, for example:

<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240607001" />

You can see the PlaceholderText is aligned as expected:

PlaceholderText is aligned as expected

Screenshots

No response

NuGet package version

None

Windows version

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageIssue needs to be triaged by the area owners

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions