Share via


DpiHelper.DeviceToLogicalUnits Method

Definition

Overloads

DeviceToLogicalUnits(Point)
Obsolete.

Extension method for Point that returns a new Point with the input's coordinates converted from device units to logical units.

DeviceToLogicalUnits(Rect)
Obsolete.

Extension method for Rect that returns a new Rect with the input's coordinates converted from device units to logical units.

DeviceToLogicalUnits(Size)
Obsolete.

Extension method for Size that returns a new Size with the input's dimensions converted from device units to logical units.

DeviceToLogicalUnits(Thickness)
Obsolete.

Extension method for Thickness that returns a new Thickness with the input's dimensions converted from device units to logical units.

DeviceToLogicalUnits(Point)

Caution

Use Microsoft.VisualStudio.Utilities.DpiAwareness instead.

Extension method for Point that returns a new Point with the input's coordinates converted from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Windows::Point DeviceToLogicalUnits(System::Windows::Point devicePoint);
public static System.Windows.Point DeviceToLogicalUnits (this System.Windows.Point devicePoint);
[System.Obsolete("Use Microsoft.VisualStudio.Utilities.DpiAwareness instead.")]
public static System.Windows.Point DeviceToLogicalUnits (this System.Windows.Point devicePoint);
static member DeviceToLogicalUnits : System.Windows.Point -> System.Windows.Point
[<System.Obsolete("Use Microsoft.VisualStudio.Utilities.DpiAwareness instead.")>]
static member DeviceToLogicalUnits : System.Windows.Point -> System.Windows.Point
<Extension()>
Public Function DeviceToLogicalUnits (devicePoint As Point) As Point

Parameters

devicePoint
Point

Point in device coordinates

Returns

Point in logical coordinates

Attributes

Applies to

DeviceToLogicalUnits(Rect)

Caution

Use Microsoft.VisualStudio.Utilities.DpiAwareness instead.

Extension method for Rect that returns a new Rect with the input's coordinates converted from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Windows::Rect DeviceToLogicalUnits(System::Windows::Rect deviceRect);
public static System.Windows.Rect DeviceToLogicalUnits (this System.Windows.Rect deviceRect);
[System.Obsolete("Use Microsoft.VisualStudio.Utilities.DpiAwareness instead.")]
public static System.Windows.Rect DeviceToLogicalUnits (this System.Windows.Rect deviceRect);
static member DeviceToLogicalUnits : System.Windows.Rect -> System.Windows.Rect
[<System.Obsolete("Use Microsoft.VisualStudio.Utilities.DpiAwareness instead.")>]
static member DeviceToLogicalUnits : System.Windows.Rect -> System.Windows.Rect
<Extension()>
Public Function DeviceToLogicalUnits (deviceRect As Rect) As Rect

Parameters

deviceRect
Rect

Rect in device coordinates

Returns

Rect in logical coordinates

Attributes

Applies to

DeviceToLogicalUnits(Size)

Caution

Use Microsoft.VisualStudio.Utilities.DpiAwareness instead.

Extension method for Size that returns a new Size with the input's dimensions converted from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Windows::Size DeviceToLogicalUnits(System::Windows::Size deviceSize);
public static System.Windows.Size DeviceToLogicalUnits (this System.Windows.Size deviceSize);
[System.Obsolete("Use Microsoft.VisualStudio.Utilities.DpiAwareness instead.")]
public static System.Windows.Size DeviceToLogicalUnits (this System.Windows.Size deviceSize);
static member DeviceToLogicalUnits : System.Windows.Size -> System.Windows.Size
[<System.Obsolete("Use Microsoft.VisualStudio.Utilities.DpiAwareness instead.")>]
static member DeviceToLogicalUnits : System.Windows.Size -> System.Windows.Size
<Extension()>
Public Function DeviceToLogicalUnits (deviceSize As Size) As Size

Parameters

deviceSize
Size

Size in device units

Returns

Size in logical units

Attributes

Applies to

DeviceToLogicalUnits(Thickness)

Caution

Use Microsoft.VisualStudio.Utilities.DpiAwareness instead.

Extension method for Thickness that returns a new Thickness with the input's dimensions converted from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Windows::Thickness DeviceToLogicalUnits(System::Windows::Thickness deviceThickness);
public static System.Windows.Thickness DeviceToLogicalUnits (this System.Windows.Thickness deviceThickness);
[System.Obsolete("Use Microsoft.VisualStudio.Utilities.DpiAwareness instead.")]
public static System.Windows.Thickness DeviceToLogicalUnits (this System.Windows.Thickness deviceThickness);
static member DeviceToLogicalUnits : System.Windows.Thickness -> System.Windows.Thickness
[<System.Obsolete("Use Microsoft.VisualStudio.Utilities.DpiAwareness instead.")>]
static member DeviceToLogicalUnits : System.Windows.Thickness -> System.Windows.Thickness
<Extension()>
Public Function DeviceToLogicalUnits (deviceThickness As Thickness) As Thickness

Parameters

deviceThickness
Thickness

The device thickness.

Returns

Thickness in logical units

Attributes

Applies to