[AutoSuggestBox] PlaceholderText does not vertically align to the center
See original GitHub issueDescribe 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
- Add AutoSuggestBox with a PlaceholderText and increase the height.
- 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:
Actual text:
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:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
🎉This issue was addressed in #5968, which has now been successfully released as
Microsoft.UI.Xaml v2.8.2
.🎉Handy links: