Exemplo n.º 1
0
        static Rect CalcSafeArea(DeviceSafeAreaMargin device, bool isPortrait)
        {
            var margin = isPortrait ? device.PortraitMargin : device.LandscapeMargin;
            var width  = isPortrait ? device.ScreenWidth : device.ScreenHeight;
            var height = isPortrait ? device.ScreenHeight : device.ScreenWidth;

            return(Rect.MinMaxRect(margin.Left, margin.Bottom, width - margin.Right, height - margin.Top));
        }
Exemplo n.º 2
0
 static bool HasSaveResolution(DeviceSafeAreaMargin device, int width, int height)
 {
     return(device.ScreenWidth == width && device.ScreenHeight == height ||
            device.ScreenHeight == width && device.ScreenWidth == height);
 }