question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[AutoSuggestBox] PlaceholderText does not vertically align to the center

See original GitHub issue

Describe the bug The PlaceholderText in the AutoSuggestBox is not vertically aligned. This requires devs to go into the control template to fix it which isn’t productive

Steps to reproduce the behavior

  1. Add AutoSuggestBox with a PlaceholderText and increase the height.
  2. See the result

<AutoSuggestBox PlaceholderText="Replace with" Height="48" Padding="12,12,0,0" VerticalAlignment="Center" VerticalContentAlignment="Center" />

Expected behavior PlaceholderText should vertically align, like the actual Text in AutoSuggestBox itself. TextBox does this correctly.

Screenshots PlaceholderText:

image

Actual text: image

Version Info C++, Xaml Islands, 2.7.0-prerelease.210913003

Windows version Saw the problem?
May 2021 Update (19043) Yes
Device form factor Saw the problem?
Desktop Yes

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
chingucodingcommented, Sep 24, 2021

I’m afraid there is not much you can do here @niels9001 . You can pretty much only retemplate the control to fix this bug. The fix would be to set the VerticalContentAlignment of the placeholder presenter. If the team’s fine with that, I would like to fix this.

0reactions
msftbot[bot]commented, Jan 3, 2023

🎉This issue was addressed in #5968, which has now been successfully released as Microsoft.UI.Xaml v2.8.2.🎉

Handy links:

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change alignment of text inside AutoSuggestBox (UWP ...
It's used to show the 'Search Reg' text. You need to set VerticalAlignment="Center" for it to make the text be in vertical center....
Read more >
Autosugest box unaligned text · Issue #3284
The autosugest box's placeholder and content text do not center-align vertically when indicated. Changing it to bottom doesn't appears to work ...
Read more >
TextBox Class (Windows.UI.Xaml.Controls) - UWP
A multi-line TextBox will continue to grow vertically as text is entered unless it's constrained by its Height or MaxHeight property, or by...
Read more >
Text not in the center of TextField, when creating a rounded ...
I am not seeing any issue in your code .By default the vertical alignment in TextField is center only. Without this statement "verticalAlignment ......
Read more >
My textarea box won't vertically align - HTML-CSS
My placeholder text is sitting mid-way down the box instead of at the top left hand corner where I want it. I've tried...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found