Exemplo n.º 1
0
        private void Scale()
        {
            if (DpiScaler.NotDpiScaling(this))
            {
                return;
            }

            if (Scaled)
            {
                (_originalSize, _originalLocation) = DpiScaler.ScaleControl(this, _originalSize, _originalLocation, true);
                Console.WriteLine($"DPI Scaled TabPage: {Text} - Size: {Width}x{Height} (orig {_originalSize.Width}x{_originalSize.Height}), Location: {Location.X}x{Location.Y} (orig: {_originalLocation.X}x{_originalLocation.Y})");
                OnControlScaled(DpiScaler.GetScalingFactor(this));
            }
        }
Exemplo n.º 2
0
 public void ManualDpiScale()
 {
     (_originalSize, _originalLocation) = DpiScaler.ScaleSize(this, _originalSize, _originalLocation);
 }