Example #1
0
 public ZoomBox()
 {
     transform = new ScaleTransform {
         ScaleX = 1, ScaleY = 1
     };
     DisplayInformationEx = DisplayInformationEx.Default;
     DefaultStyleKey      = typeof(ZoomBox);
 }
        static DisplayInformationEx()
        {
            if (!DesignerProperties.IsInDesignTool)
              {
            Default = CreateForHardwareOrLegacyFallback();
            return;
              }

              var size = SizeHelpers.MakeSizeFromDiagonal(DisplayConstants.BaselineDiagonalInInches15To9HighRes, DisplayConstants.AspectRatio15To9);
              var resolution = SizeHelpers.MakeSize(SizeHelpers.WxgaPhysicalResolution.Width, DisplayConstants.AspectRatio15To9);
              Default = new DisplayInformationEx(size, resolution, DisplayInformationSource.DesignTimeFallback);
        }
Example #3
0
        static DisplayInformationEx()
        {
            if (!DesignerProperties.IsInDesignTool)
            {
                Default = CreateForHardwareOrLegacyFallback();
                return;
            }

            var size       = SizeHelpers.MakeSizeFromDiagonal(DisplayConstants.BaselineDiagonalInInches15To9HighRes, DisplayConstants.AspectRatio15To9);
            var resolution = SizeHelpers.MakeSize(SizeHelpers.WxgaPhysicalResolution.Width, DisplayConstants.AspectRatio15To9);

            Default = new DisplayInformationEx(size, resolution, DisplayInformationSource.DesignTimeFallback);
        }