Skip to content

Instantly share code, notes, and snippets.

@SamedBll
Created September 27, 2017 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SamedBll/523b99ae0eaab3b7b01389cb151d5e91 to your computer and use it in GitHub Desktop.
Save SamedBll/523b99ae0eaab3b7b01389cb151d5e91 to your computer and use it in GitHub Desktop.
B(C) - 25
public class ErişebilirlikTestPage : ContentPage
{
public ErişebilirlikTestPage()
{
Label testLabel = new Label
{
Text = "FontSize 20" + Environment.NewLine + "20 karakter arasında",
FontSize = 20,
HorizontalTextAlignment = TextAlignment.Center,
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.CenterAndExpand
};
Label displayLabel = new Label
{
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.CenterAndExpand
};
testLabel.SizeChanged += (sender, args) =>
{
displayLabel.Text = String.Format("{0:F0} \u00D7 {1:F0}", testLabel.Width,
testLabel.Height);
};
Content = new StackLayout
{
Children =
{
testLabel,
displayLabel
}
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment