DpiHelper::CreateDeviceFromLogicalImage Method (Icon^, ImageScalingMode)

 

Extension method for System.Drawing.Image that creates and returns a new bitmap or metafile scaled for the device units. When displayed on the device, the scaled image 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:
[ExtensionAttribute]
static Icon^ CreateDeviceFromLogicalImage(
	Icon^ logicalIcon,
	ImageScalingMode scalingMode = ImageScalingMode::Default
)

Parameters

logicalIcon
Type: System.Drawing::Icon^

The image to scale from logical units to device units

scalingMode
Type: Microsoft.VisualStudio.PlatformUI::ImageScalingMode

The scaling mode to use when scaling the image

Return Value

Type: System.Drawing::Icon^

Returns Icon.

Return to top
Show: