Condividi tramite


DpiHelper.CreateDeviceFromLogicalImage Method (ImageList, Color, ImageScalingMode)

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.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function CreateDeviceFromLogicalImage ( _
    logicalImageList As ImageList, _
    backgroundColor As Color, _
    scalingMode As ImageScalingMode _
) As ImageList
public static ImageList CreateDeviceFromLogicalImage(
    this ImageList logicalImageList,
    Color backgroundColor,
    ImageScalingMode scalingMode
)
[ExtensionAttribute]
public:
static ImageList^ CreateDeviceFromLogicalImage(
    ImageList^ logicalImageList, 
    Color backgroundColor, 
    ImageScalingMode scalingMode
)
static member CreateDeviceFromLogicalImage : 
        logicalImageList:ImageList * 
        backgroundColor:Color * 
        scalingMode:ImageScalingMode -> ImageList
public static function CreateDeviceFromLogicalImage(
    logicalImageList : ImageList, 
    backgroundColor : Color, 
    scalingMode : ImageScalingMode
) : ImageList

Parameters

  • logicalImageList
    Type: ImageList

    The image list.

  • backgroundColor
    Type: Color

    A color value to be used for the image background. When the interpolation mode is Bilinear or Bicubic, the image's margins are interpolated with the background.

Return Value

Type: ImageList
The image.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ImageList. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework Security

See Also

Reference

DpiHelper Class

CreateDeviceFromLogicalImage Overload

Microsoft.VisualStudio.PlatformUI Namespace