AdvancedTextBoxAutoScaleFont Property

Gets or sets whether the Font should be automatically scaled when DPI changes and the current thread has per-monitor DPI awareness.
Default value: .

Definition

Namespace: KGySoft.WinForms.Controls
Assembly: KGySoft.WinForms (in KGySoft.WinForms.dll) Version: 5.0.1
C#
[DefaultValueAttribute(true)]
public bool AutoScaleFont { get; set; }

Property Value

Boolean

Remarks

When , the Font is automatically scaled to the current DPI of the corresponding display on every executing platform. It also ensures that without an explicitly set font it is inherited from Parent, which would be the normal behavior, but is broken in .NET 6+ and above.

When , the Font may or may not be scaled, and the font of the parent control may or may not be applied correctly, depending on the default behavior of the executing platform.

  Note

Please note that this property affects the font only. Scaling the size and location always depends on the executing platform behavior.

See Also