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.

Autosugest box unaligned text

See original GitHub issue

Describe the bug The autosugest box’s placeholder and content text do not center-align vertically when indicated. Changing it to bottom doesn’t appears to work either.

Steps to reproduce the bug

Steps to reproduce the behavior: 1- Create a Autosugest box using the following boilerplate code:

	<Grid x:Name="ContentArea" Margin="{StaticResource MediumLeftRightMargin}">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="*" />
		</Grid.RowDefinitions>
		<!-- Top Bar Definitions -->
		<Grid Grid.Row="0" Margin="15">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="2.5*" />
				<ColumnDefinition Width="1.5*" />
			</Grid.ColumnDefinitions>
			<!-- Search Box -->
			<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
				<AutoSuggestBox x:Name="SearchDownload" Width="475" Height="45"
				PlaceholderText="Find a downloaded item" QueryIcon="Find"
				VerticalContentAlignment="Bottom" HorizontalContentAlignment="Left"
				TextChanged="SearchDownload_TextChanged" QuerySubmitted="SearchDownload_QuerySubmitted" SuggestionChosen="SearchDownload_SuggestionChosen" />
			</StackPanel>
         </Grid>

Expected behavior The text should modify its centering relative to the control itself.

Screenshots

Autosugest box without content Autosugest box with content

Version Info 2.4.3 recently updated but it didn’t solve it either. Used an older version (I think it was 2.2.1) and the problem existed there too, that’s why I updated the dependence.

NuGet package version: Microsoft.UI.Xaml 2.4.3

Windows app type:

UWP Win32
Yes
Windows 10 version Saw the problem?
Insider Build (xxxxx)
May 2020 Update (19041)
November 2019 Update (18363) Yes
May 2019 Update (18362) Yes
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub
IoT

Additional context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
chingucodingcommented, Jan 27, 2021

@ranjeshj I think you can close this again since #4037 won’t revert the changes to AutoSuggestBox anymore.

1reaction
beervoleycommented, Oct 6, 2020

@OnlyOnePro @chingucoding Please have a look at this PR that addresses this issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change alignment of text inside AutoSuggestBox (UWP ...
1 Answer 1 ... To achieve your target, you need to customize the TextBox's ControlTemplate in AutoSuggestBox's style. You could follow Use tools ......
Read more >
AutoSuggestBox Class (Windows.UI.Xaml.Controls)
Represents a text control that makes suggestions to users as they enter text using a keyboard or pen (using ink and handwriting recognition)....
Read more >
Browser Compatibility Guide for PeopleSoft Applications
The auto-suggest box, which appears when you enter text in the Search Menu field of the drop- down menu, does not close when...
Read more >
Enum ColumnAggregatesAlignment - Telerik UI for WPF API ...
Aggregate results are aligned to columns and placed on the same row as group key. NoAlignment. Aggregate results are not aligned to columns....
Read more >
XAML Brewer, by Diederik Krols | If you're not having fun, you ...
Another nice improvement is the better vertical alignment of the value and unit texts. The control definitely looks better that its ancestors.
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