PrintPreviewDialog.AutoScale Property

Definition

Gets or sets a value indicating whether the form adjusts its size to fit the height of the font used on the form and scales its controls.

C#
[System.ComponentModel.Browsable(false)]
public bool AutoScale { get; set; }

Property Value

true if the form will automatically scale itself and its controls based on the current font assigned to the form; otherwise, false. The default is true.

Attributes

Remarks

You can use this property to allow your form and its controls to automatically adjust based on changes in the font. This can be useful in applications where the font might increase or decrease based on the language specified for use by Windows.

To obtain the size the form will auto scale to, use the AutoScaleBaseSize property. If you want to determine the size the form will auto scale to based on a specific font, use the GetAutoScaleSize method.

Applies to

Produkt Versioner
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10