Skip to content

Instantly share code, notes, and snippets.

@SamedBll
Created August 19, 2017 10:52
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/7863c44700edbb75ec011c4827891fd5 to your computer and use it in GitHub Desktop.
Save SamedBll/7863c44700edbb75ec011c4827891fd5 to your computer and use it in GitHub Desktop.
B(C) 21
public class BoyutuNePage : ContentPage
{
Label label;
public BoyutuNePage()
{
label = new Label
{
FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.Center
};
Content = label;
SizeChanged += OnPageSizeChanged;
}
void OnPageSizeChanged(object sender, EventArgs args)
{
label.Text = String.Format("{0} \u00D7 {1}", Width, Height);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment