[]
        
(Showing Draft Content)

C1.Win.Util.DpiHelper.ScaleToDPI

ScaleToDPI Method

ScaleToDPI(int, int)

Scales a int value to the dpi.

Declaration
public static int ScaleToDPI(int value, int dpi)
Public Shared Function ScaleToDPI(value As Integer, dpi As Integer) As Integer
Parameters
Type Name Description
int value

The value for scaling.

int dpi

The DPI value for the current display device.

Returns
Type Description
int

The scaled value.

ScaleToDPI(float, int)

Scales a float value to the dpi.

Declaration
public static float ScaleToDPI(float value, int dpi)
Public Shared Function ScaleToDPI(value As Single, dpi As Integer) As Single
Parameters
Type Name Description
float value

The value for scaling.

int dpi

The DPI value for the current display device.

Returns
Type Description
float

The scaled value.

ScaleToDPI(double, int)

Scales a double value to the dpi.

Declaration
public static double ScaleToDPI(double value, int dpi)
Public Shared Function ScaleToDPI(value As Double, dpi As Integer) As Double
Parameters
Type Name Description
double value

The value for scaling.

int dpi

The DPI value for the current display device.

Returns
Type Description
double

The scaled value.

ScaleToDPI(Size, int)

Scales a Size value to the dpi.

Declaration
public static Size ScaleToDPI(Size value, int dpi)
Public Shared Function ScaleToDPI(value As Size, dpi As Integer) As Size
Parameters
Type Name Description
Size value

The value for scaling.

int dpi

The DPI value for the current display device.

Returns
Type Description
Size

The scaled value.

ScaleToDPI(Thickness, int)

Scales a Thickness value to the dpi.

Declaration
public static Thickness ScaleToDPI(Thickness value, int dpi)
Public Shared Function ScaleToDPI(value As Thickness, dpi As Integer) As Thickness
Parameters
Type Name Description
Thickness value

The value for scaling.

int dpi

The DPI value for the current display device.

Returns
Type Description
Thickness

The scaled value.

ScaleToDPI(RectangleF, int)

Scales a RectangleF value to the dpi.

Declaration
public static RectangleF ScaleToDPI(RectangleF value, int dpi)
Public Shared Function ScaleToDPI(value As RectangleF, dpi As Integer) As RectangleF
Parameters
Type Name Description
RectangleF value

The value for scaling.

int dpi

The DPI value for the current display device.

Returns
Type Description
RectangleF

The scaled value.

ScaleToDPI(Style, int)

Scales the Style instance to the dpi.

Declaration
public static void ScaleToDPI(Style value, int dpi)
Public Shared Sub ScaleToDPI(value As Style, dpi As Integer)
Parameters
Type Name Description
Style value

The style for scaling.

int dpi

The DPI value for the current display device.

Remarks

This method doen't scale the Font property.