Bug 36427 - [Windows] Label.VerticalTextAlignment does not seem to work on Forms 2.0.0.6487
Summary: [Windows] Label.VerticalTextAlignment does not seem to work on Forms 2.0.0.6487
Status: RESOLVED DUPLICATE of bug 35490
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.0.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
: 37066 ()
Depends on:
Blocks:
 
Reported: 2015-12-01 15:15 UTC by Jordan Roselle
Modified: 2015-12-23 18:52 UTC (History)
3 users (show)

Tags: ac
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 35490

Description Jordan Roselle 2015-12-01 15:15:57 UTC
I have a label that is significantly taller than the text it contains. I have verified it is the size I expect by setting the background color. Since upgrading to 2.0.0.6487 text does not seem to be respecting alignment. I changed everything from the old YAlign to the new VerticalTextAlignment but the text is always at the start, even when I set it to center or end.

On Android the text is aligned as expected.
Comment 1 Paul DiPietro [MSFT] 2015-12-01 16:17:40 UTC
A reproduction project would be much appreciated in helping to investigate the issue.
Comment 2 Jordan Roselle 2015-12-01 16:50:14 UTC
Full example project can be found here: http://1drv.ms/1LLJIPu

If you run the app on Windows you will see a green box, which is the label, with the text at the top of the green box. If you run the app on Android the welcome text will be correctly centered in the green box.

The code that is changed:
public App ()
		{
			// The root page of your application
			MainPage = new ContentPage {
				Content = new StackLayout {
					VerticalOptions = LayoutOptions.Center,
					Children = {
						new Label {
                            HeightRequest = 100,
                            BackgroundColor = Color.Green,
                            VerticalTextAlignment = TextAlignment.Center,
							Text = "Welcome to Xamarin Forms!"
						}
					}
				}
			};
		}
Comment 3 Paul DiPietro [MSFT] 2015-12-16 16:02:49 UTC
*** Bug 37066 has been marked as a duplicate of this bug. ***
Comment 4 E.Z. Hart [MSFT] 2015-12-23 18:52:09 UTC

*** This bug has been marked as a duplicate of bug 35490 ***