This documentation is archived and is not being maintained.

DpiHelper Class

Microsoft internal use only.

Object
  Microsoft.VisualStudio.PlatformUI.DpiHelper

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

public static class DpiHelper

The DpiHelper type exposes the following members.

  NameDescription
Public propertyStatic memberBitmapScalingModeGets 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.
Public propertyStatic memberDeviceDpiXMicrosoft internal use only.
Public propertyStatic memberDeviceDpiYMicrosoft internal use only.
Public propertyStatic memberDeviceToLogicalUnitsScalingFactorXMicrosoft internal use only.
Public propertyStatic memberDeviceToLogicalUnitsScalingFactorYMicrosoft internal use only.
Public propertyStatic memberImageScalingModeGets 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.
Public propertyStatic memberIsScalingRequiredDetermines whether scaling is required when converting between logical-device units.
Public propertyStatic memberLogicalToDeviceUnitsScalingFactorXMicrosoft internal use only.
Public propertyStatic memberLogicalToDeviceUnitsScalingFactorYMicrosoft internal use only.
Public propertyStatic memberTransformFromDeviceMicrosoft internal use only.
Public propertyStatic memberTransformToDeviceMicrosoft internal use only.
Top

  NameDescription
Public methodStatic memberCreateDeviceFromLogicalImage(Icon, ImageScalingMode)
Public methodStatic memberCreateDeviceFromLogicalImage(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.
Public methodStatic memberCreateDeviceFromLogicalImage(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.
Public methodStatic memberCreateDeviceFromLogicalImage(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.
Public methodStatic memberCreateDeviceFromLogicalImage(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.
Public methodStatic memberCreateDeviceFromLogicalImage(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.
Public methodStatic memberCreateDeviceFromLogicalImage(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.
Public methodStatic memberDeviceToLogicalUnits(Point)Microsoft internal use only.
Public methodStatic memberDeviceToLogicalUnits(Rect)Microsoft internal use only.
Public methodStatic memberDeviceToLogicalUnits(Size)Microsoft internal use only.
Public methodStatic memberDeviceToLogicalUnits(Thickness)Converts the specified measurement to logical units.
Public methodStatic memberDeviceToLogicalUnitsX(Double)Transforms a horizontal coordinate from device to logical units.
Public methodStatic memberDeviceToLogicalUnitsX(Int32)Transforms a horizontal coordinate from device to logical units.
Public methodStatic memberDeviceToLogicalUnitsX(Single)Transforms a horizontal coordinate from device to logical units.
Public methodStatic memberDeviceToLogicalUnitsY(Double)Transforms a vertical coordinate from device to logical units.
Public methodStatic memberDeviceToLogicalUnitsY(Int32)Transforms a vertical coordinate from device to logical units.
Public methodStatic memberDeviceToLogicalUnitsY(Single)Transforms a vertical coordinate from device to logical units.
Public methodStatic memberGetDeviceActualSizeMicrosoft internal use only.
Public methodStatic memberGetDeviceHeightMicrosoft internal use only.
Public methodStatic memberGetDeviceLeftMicrosoft internal use only.
Public methodStatic memberGetDeviceRectMicrosoft internal use only.
Public methodStatic memberGetDeviceTopMicrosoft internal use only.
Public methodStatic memberGetDeviceWidthMicrosoft internal use only.
Public methodStatic memberLogicalToDeviceUnits(Point)Converts the specified coordinates from logical units to device units.
Public methodStatic memberLogicalToDeviceUnits(PointF)Converts the specified coordinates from logical units to device units.
Public methodStatic memberLogicalToDeviceUnits(Rectangle)Converts the specified coordinates from logical units to device units.
Public methodStatic memberLogicalToDeviceUnits(RectangleF)Converts the specified coordinates from logical units to device units.
Public methodStatic memberLogicalToDeviceUnits(Size)Converts the specified coordinates from logical units to device units.
Public methodStatic memberLogicalToDeviceUnits(SizeF)Converts the specified coordinates from logical units to device units.
Public methodStatic memberLogicalToDeviceUnits(Point)Converts the specified coordinates from logical units to device units.
Public methodStatic memberLogicalToDeviceUnits(Rect)Microsoft internal use only.
Public methodStatic memberLogicalToDeviceUnits(Size)Microsoft internal use only.
Public methodStatic memberLogicalToDeviceUnits(Thickness)
Public methodStatic memberLogicalToDeviceUnits(Bitmap, ImageScalingMode)Converts the specified coordinates from logical units to device units.
Public methodStatic memberLogicalToDeviceUnits(Icon, ImageScalingMode)
Public methodStatic memberLogicalToDeviceUnits(Image, ImageScalingMode)Converts the specified coordinates from logical units to device units.
Public methodStatic memberLogicalToDeviceUnits(ImageList, ImageScalingMode)Converts the specified coordinates from logical units to device units.
Public methodStatic memberLogicalToDeviceUnits(Bitmap, Color, ImageScalingMode)Converts the specified coordinates from logical units to device units.
Public methodStatic memberLogicalToDeviceUnits(Bitmap, Size, ImageScalingMode)Converts the specified coordinates from logical units to device units.
Public methodStatic memberLogicalToDeviceUnits(Image, Color, ImageScalingMode)Converts the specified coordinates from logical units to device units.
Public methodStatic memberLogicalToDeviceUnits(ImageList, Color, ImageScalingMode)Converts the specified coordinates from logical units to device units.
Public methodStatic memberLogicalToDeviceUnits(Bitmap, Size, Color, ImageScalingMode)Converts the specified coordinates from logical units to device units.
Public methodStatic memberLogicalToDeviceUnitsX(Double)Returns the closest value in logical units that are converted to an integer value when converted to horizontal device units.
Public methodStatic memberLogicalToDeviceUnitsX(Int32)Returns the closest value in logical units that are converted to an integer value when converted to horizontal device units.
Public methodStatic memberLogicalToDeviceUnitsX(Single)Returns the closest value in logical units that are converted to an integer value when converted to horizontal device units.
Public methodStatic memberLogicalToDeviceUnitsY(Double)Returns the closest value in logical units that will be converted to an integer value when converted to vertical device units.
Public methodStatic memberLogicalToDeviceUnitsY(Int32)Returns the closest value in logical units that will be converted to an integer value when converted to vertical device units.
Public methodStatic memberLogicalToDeviceUnitsY(Single)Returns the closest value in logical units that will be converted to an integer value when converted to vertical device units.
Public methodStatic memberRoundToDeviceUnitsXReturns the closest value in logical units that will be converted to an integer value when converted to horizontal device units.
Public methodStatic memberRoundToDeviceUnitsYReturns the closest value in logical units that will be converted to an integer value when converted to vertical device units.
Public methodStatic memberSetDeviceHeightMicrosoft internal use only.
Public methodStatic memberSetDeviceLeftMicrosoft internal use only.
Public methodStatic memberSetDeviceTopMicrosoft internal use only.
Public methodStatic memberSetDeviceWidthMicrosoft internal use only.
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: