BaseFormDeviceScale Property
Gets the current scale of the form's display device. Before loading the form, or when per-monitor DPI awareness is not enabled,
this property returns the system scale of the primary display, which is the same as the
ScaleHelper.SystemScale property.
Namespace: KGySoft.WinForms.FormsAssembly: KGySoft.WinForms (in KGySoft.WinForms.dll) Version: 5.0.1
[BrowsableAttribute(false)]
public PointF DeviceScale { get; }
<BrowsableAttribute(false)>
Public ReadOnly Property DeviceScale As PointF
Get
public:
[BrowsableAttribute(false)]
property PointF DeviceScale {
PointF get ();
}
[<BrowsableAttribute(false)>]
member DeviceScale : PointF with get
Property Value
PointF This property is similar to the DeviceDpi property, but it returns the scale factor as a PointF value,
and it is available for all .NET versions starting with .NET Framework 3.5.
Even on platforms where the
DeviceDpi is available, the
DeviceDpi property
may return an incorrect value (e.g. the .NET Framework requires the DPI awareness settings in the
app.config file, even
if the awareness is set in the application manifest). In contrast, this property always returns the correct scale
if there is an application manifest file or the DPI awareness is set for the application manually.