Example #1
0
 public AppStatics.DeviceHelper GetDevice()
 {
     AppStatics.DeviceHelper _helper = new AppStatics.DeviceHelper
     {
         ScreenHeight = (int)UIScreen.MainScreen.Bounds.Height,
         ScreenWidth  = (int)UIScreen.MainScreen.Bounds.Width
     };
     return(_helper);
 }
Example #2
0
        public AppStatics.DeviceHelper GetDevice()
        {
            var metrics = Resources.System.DisplayMetrics;

            AppStatics.DeviceHelper _helper = new AppStatics.DeviceHelper
            {
                ScreenHeight = ConvertPixelsToDp(metrics.HeightPixels),
                ScreenWidth  = ConvertPixelsToDp(metrics.WidthPixels)
            };
            return(_helper);
        }