DpiHelper Class

Definition

Microsoft internal use only.

public ref class DpiHelper abstract sealed
public ref class DpiHelper abstract sealed
class DpiHelper abstract sealed
public static class DpiHelper
type DpiHelper = class
Public Module DpiHelper
Inheritance
DpiHelper

Properties

BitmapScalingMode

Gets the BitmapScalingMode algorithm to be used for resizing images in WPF. This allows the shell to control the algorithm depending on the dpi zoom scale, and allows the user to override it via registry settings like General\BitmapScalingXXX = (BitmapScalingMode)value, with XXX the zoom factor in percents, e.g. BitmapScaling150, etc.

DeviceDpiX

Microsoft internal use only.

DeviceDpiY

Microsoft internal use only.

DeviceToLogicalUnitsScalingFactorX

Microsoft internal use only.

DeviceToLogicalUnitsScalingFactorY

Microsoft internal use only.

DpiScalePercentX

Gets the DPI scale percent for the horizontal scale.

DpiScalePercentY

Gets the DPI scale percent for the vertical scale.

ImageScalingMode

Gets the ImageScalingMode algorithm to be used for resizing images in WinForms/Win32. This allows the shell to control the algorithm depending on the dpi zoom scale, and allows the user to override it via registry settings like General\ImageScalingXXX = (ImageScalingMode)value, with XXX the zoom factor in percents, e.g. ImageScaling150, etc.

Instance

Gets an instance of DpiHelper.

IsScalingRequired

Determines whether scaling is required when converting between logical-device units.

LogicalDpiX

Gets the logical DPI for the horizontal coordinates.

LogicalDpiY

Gets the logical DPI for the vertical coordinates.

LogicalToDeviceUnitsScalingFactorX

Microsoft internal use only.

LogicalToDeviceUnitsScalingFactorY

Microsoft internal use only.

PreScaledImageLayoutTransformScaleX

Gets the horizontal scale value that should be used with a LayoutTransform/ScaleTransform to scale back an image pre-scaled in HighDPI with DpiPrescaleImageSourceConverter in order to obtain crisp results.

PreScaledImageLayoutTransformScaleY

Gets the vertical scale value that should be used with a LayoutTransform/ScaleTransform to scale back an image pre-scaled in HighDPI with DpiPrescaleImageSourceConverter in order to obtain crisp results.

TransformFromDevice

Microsoft internal use only.

TransformToDevice

Microsoft internal use only.

UsePreScaledImages

Determines whether images should be pre-scaled at zoom levels higher than 200%, using NearestNeighbor up to the largest multiple of 100%.

Methods

CreateDeviceFromLogicalImage(Bitmap, Size, 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.

CreateDeviceFromLogicalImage(Bitmap, Size, 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.

CreateDeviceFromLogicalImage(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.

CreateDeviceFromLogicalImage(Image, 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.

CreateDeviceFromLogicalImage(Image, 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.

CreateDeviceFromLogicalImage(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.

CreateDeviceFromLogicalImage(ImageList, 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.

DeviceToLogicalUnits(Point)

Microsoft internal use only.

DeviceToLogicalUnits(Rect)

Microsoft internal use only.

DeviceToLogicalUnits(Size)

Microsoft internal use only.

DeviceToLogicalUnits(Thickness)

Converts the specified measurement to logical units.

DeviceToLogicalUnitsX(Double)

Transforms a horizontal coordinate from device to logical units.

DeviceToLogicalUnitsX(Int32)

Transforms a horizontal coordinate from device to logical units.

DeviceToLogicalUnitsX(Single)

Transforms a horizontal coordinate from device to logical units.

DeviceToLogicalUnitsY(Double)

Transforms a vertical coordinate from device to logical units.

DeviceToLogicalUnitsY(Int32)

Transforms a vertical coordinate from device to logical units.

DeviceToLogicalUnitsY(Single)

Transforms a vertical coordinate from device to logical units.

GetDeviceActualSize(FrameworkElement)

Microsoft internal use only.

GetDeviceHeight(Window)

Microsoft internal use only.

GetDeviceLeft(Window)

Microsoft internal use only.

GetDeviceRect(Window)

Microsoft internal use only.

GetDeviceTop(Window)

Microsoft internal use only.

GetDeviceWidth(Window)

Microsoft internal use only.

LogicalToDeviceUnits(Bitmap, Color, ImageScalingMode)

Converts the specified coordinates from logical units to device units.

LogicalToDeviceUnits(Bitmap, ImageScalingMode)

Converts the specified coordinates from logical units to device units.

LogicalToDeviceUnits(Bitmap, Size, Color, ImageScalingMode)

Converts the specified coordinates from logical units to device units.

LogicalToDeviceUnits(Bitmap, Size, ImageScalingMode)

Converts the specified coordinates from logical units to device units.

LogicalToDeviceUnits(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.

LogicalToDeviceUnits(Image, Color, ImageScalingMode)

Converts the specified coordinates from logical units to device units.

LogicalToDeviceUnits(Image, ImageScalingMode)

Converts the specified coordinates from logical units to device units.

LogicalToDeviceUnits(ImageList, Color, ImageScalingMode)

Converts the specified coordinates from logical units to device units.

LogicalToDeviceUnits(ImageList, ImageScalingMode)

Converts the specified coordinates from logical units to device units.

LogicalToDeviceUnits(Point)

Converts the specified coordinates from logical units to device units.

LogicalToDeviceUnits(Point)

Converts the specified coordinates from logical units to device units.

LogicalToDeviceUnits(PointF)

Converts the specified coordinates from logical units to device units.

LogicalToDeviceUnits(Rect)

Microsoft internal use only.

LogicalToDeviceUnits(Rectangle)

Converts the specified coordinates from logical units to device units.

LogicalToDeviceUnits(RectangleF)

Converts the specified coordinates from logical units to device units.

LogicalToDeviceUnits(Size)

Microsoft internal use only.

LogicalToDeviceUnits(Size)

Converts the specified coordinates from logical units to device units.

LogicalToDeviceUnits(SizeF)

Converts the specified coordinates from logical units to device units.

LogicalToDeviceUnits(Thickness)
LogicalToDeviceUnitsX(Double)

Returns the closest value in logical units that are converted to an integer value when converted to horizontal device units.

LogicalToDeviceUnitsX(Int32)

Returns the closest value in logical units that are converted to an integer value when converted to horizontal device units.

LogicalToDeviceUnitsX(Single)

Returns the closest value in logical units that are converted to an integer value when converted to horizontal device units.

LogicalToDeviceUnitsY(Double)

Returns the closest value in logical units that will be converted to an integer value when converted to vertical device units.

LogicalToDeviceUnitsY(Int32)

Returns the closest value in logical units that will be converted to an integer value when converted to vertical device units.

LogicalToDeviceUnitsY(Single)

Returns the closest value in logical units that will be converted to an integer value when converted to vertical device units.

RoundToDeviceUnitsX(Double)

Returns the closest value in logical units that will be converted to an integer value when converted to horizontal device units.

RoundToDeviceUnitsY(Double)

Returns the closest value in logical units that will be converted to an integer value when converted to vertical device units.

ScaleLogicalImageForDeviceSize(ImageSource, Size, BitmapScalingMode)

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

SetDeviceHeight(Window, Double)

Microsoft internal use only.

SetDeviceLeft(Window, Double)

Microsoft internal use only.

SetDeviceTop(Window, Double)

Microsoft internal use only.

SetDeviceWidth(Window, Double)

Microsoft internal use only.

Applies to