DpiHelper.LogicalToDeviceUnits Method (Icon, ImageScalingMode)

 

Converts (if necessary) the icon by scaling it to device units. When displayed on the device, the scaled icon will have same size as the original image would have when displayed at 96dpi.

Namespace:   Microsoft.VisualStudio.PlatformUI
Assembly:  Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

public static void LogicalToDeviceUnits(
	ref Icon icon,
	ImageScalingMode scalingMode = ImageScalingMode.Default
)

Parameters

icon
Type: System.Drawing.Icon

The bitmap icon to scale from logical units to device units.

scalingMode
Type: Microsoft.VisualStudio.PlatformUI.ImageScalingMode

The scaling mode to use when scaling the icon.

Return to top
Show: