Table of Contents

Method GetWindowScale

Namespace
SharpVectors.Runtime
Assembly
SharpVectors.Runtime.Wpf.dll

GetWindowScale(Window)

Gets the window (monitor) scale versus System DPI.

public static DpiScale GetWindowScale(Window window)

Parameters

window Window

The window.

Returns

DpiScale

Remarks

When developing a DPI-aware application, this is useful for applying a ScaleTransform to your window so all fonts and graphics are scaled and rendered beautifully based on the physical capabilities of the display and the accessibility settings of the user.

GetWindowScale(Visual)

Gets the window (monitor) scale versus System DPI.

public static DpiScale GetWindowScale(Visual visual)

Parameters

visual Visual

The window.

Returns

DpiScale

Remarks

When developing a DPI-aware application, this is useful for applying a ScaleTransform to your window so all fonts and graphics are scaled and rendered beautifully based on the physical capabilities of the display and the accessibility settings of the user.

GetWindowScale(IntPtr)

Gets the window (monitor) scale versus System DPI.

public static DpiScale GetWindowScale(IntPtr hwnd)

Parameters

hwnd IntPtr

The window.

Returns

DpiScale

Remarks

When developing a DPI-aware application, this is useful for applying a ScaleTransform to your window so all fonts and graphics are scaled and rendered beautifully based on the physical capabilities of the display and the accessibility settings of the user.