DpiHelper.ScaleLogicalImageForDeviceSize Method (ImageSource, Size, BitmapScalingMode)

Visual Studio 2015
 

Scale a WPF image to the indicated size, using the specified scalingMode.

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

public static ImageSource ScaleLogicalImageForDeviceSize(
	ImageSource image,
	Size deviceImageSize,
	BitmapScalingMode scalingMode
)

Parameters

image
Type: System.Windows.Media.ImageSource

The image to scale.

deviceImageSize
Type: System.Windows.Size

The resultant image size.

scalingMode
Type: System.Windows.Media.BitmapScalingMode

The scaling mode.

Return Value

Type: System.Windows.Media.ImageSource

The scaled-up image.

Return to top
Show: