In This Article

DpiAwareFormShowBehavior Class

Defines a behavior that can be attached to a form to ensure per-monitor DPI scaling is properly handled when showing the form.

public class DpiAwareFormShowBehavior
Inheritance:
object object

Remarks

For internal use only.

If a form is initially displayed on a monitor whose DPI is different than the DPI of the primary monitor then the form will not properly rescale to the DPI. This behavior will ensure proper DPI scaling by first showing the form on the primary monitor and then moving it to the target location.

Methods

ApplyTo(Form)

Applies the DpiAwareFormShowBehavior to the given Form.

public static Form ApplyTo(Form form)
Parameter Type Description
form Form

The Form to receive the behavior.

Returns

Form:

The Form that was given.

Inherited Members