Generic code (in App.xaml.cs)
public static int ScreenHeight {get; set;}
public static int ScreenWidth {get; set;}
part of Android (in MainActivity.cs, in the OnCreate method)
App.ScreenHeight = (int) (Resources.DisplayMetrics.HeightPixels / Resources.DisplayMetrics.Density);
App.ScreenWidth = (int) (Resources.DisplayMetrics.WidthPixels / Resources.DisplayMetrics.Density);
part of iOS (in the AppDelegate.cs application, in the FinishedLaunching method)
App.ScreenHeight = (int)UIScreen.MainScreen.Bounds.Height;
App.ScreenWidth = (int)UIScreen.MainScreen.Bounds.Width;
, App.ScreenHeight App.ScreenWidth , , .