次の方法で共有


DpiHelper.ScaleLogicalImageForDeviceSize Method

Definition

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

public:
 static System::Windows::Media::ImageSource ^ ScaleLogicalImageForDeviceSize(System::Windows::Media::ImageSource ^ image, System::Windows::Size deviceImageSize, System::Windows::Media::BitmapScalingMode scalingMode);
public static System.Windows.Media.ImageSource ScaleLogicalImageForDeviceSize (System.Windows.Media.ImageSource image, System.Windows.Size deviceImageSize, System.Windows.Media.BitmapScalingMode scalingMode);
static member ScaleLogicalImageForDeviceSize : System.Windows.Media.ImageSource * System.Windows.Size * System.Windows.Media.BitmapScalingMode -> System.Windows.Media.ImageSource
Public Function ScaleLogicalImageForDeviceSize (image As ImageSource, deviceImageSize As Size, scalingMode As BitmapScalingMode) As ImageSource

Parameters

image
ImageSource

The image to scale

deviceImageSize
Size

The resultant image size

scalingMode
BitmapScalingMode

The BitmapScalingMode to be used during image resize

Returns

The scaled up image

Applies to