共用方式為


DpiHelper Class

Microsoft internal use only.

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.PlatformUI.DpiHelper

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

Syntax

'Declaration
<ExtensionAttribute> _
Public NotInheritable Class DpiHelper
public static class DpiHelper
[ExtensionAttribute]
public ref class DpiHelper abstract sealed
[<AbstractClass>]
[<Sealed>]
type DpiHelper =  class end
public final class DpiHelper

The DpiHelper type exposes the following members.

Properties

  Name Description
Public propertyStatic member 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.
Public propertyStatic member DeviceDpiX Microsoft internal use only.
Public propertyStatic member DeviceDpiY Microsoft internal use only.
Public propertyStatic member DeviceToLogicalUnitsScalingFactorX Microsoft internal use only.
Public propertyStatic member DeviceToLogicalUnitsScalingFactorY Microsoft internal use only.
Public propertyStatic member 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.
Public propertyStatic member IsScalingRequired Determines whether scaling is required when converting between logical-device units.
Public propertyStatic member LogicalToDeviceUnitsScalingFactorX Microsoft internal use only.
Public propertyStatic member LogicalToDeviceUnitsScalingFactorY Microsoft internal use only.
Public propertyStatic member TransformFromDevice Microsoft internal use only.
Public propertyStatic member TransformToDevice Microsoft internal use only.

Top

Methods

  Name Description
Public methodStatic member CreateDeviceFromLogicalImage(Icon, ImageScalingMode)
Public methodStatic member 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.
Public methodStatic member 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.
Public methodStatic member 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.
Public methodStatic member 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.
Public methodStatic member 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.
Public methodStatic member 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.
Public methodStatic member DeviceToLogicalUnits(Point) Microsoft internal use only.
Public methodStatic member DeviceToLogicalUnits(Rect) Microsoft internal use only.
Public methodStatic member DeviceToLogicalUnits(Size) Microsoft internal use only.
Public methodStatic member DeviceToLogicalUnits(Thickness) Converts the specified measurement to logical units.
Public methodStatic member DeviceToLogicalUnitsX(Double) Transforms a horizontal coordinate from device to logical units.
Public methodStatic member DeviceToLogicalUnitsX(Int32) Transforms a horizontal coordinate from device to logical units.
Public methodStatic member DeviceToLogicalUnitsX(Single) Transforms a horizontal coordinate from device to logical units.
Public methodStatic member DeviceToLogicalUnitsY(Double) Transforms a vertical coordinate from device to logical units.
Public methodStatic member DeviceToLogicalUnitsY(Int32) Transforms a vertical coordinate from device to logical units.
Public methodStatic member DeviceToLogicalUnitsY(Single) Transforms a vertical coordinate from device to logical units.
Public methodStatic member GetDeviceActualSize Microsoft internal use only.
Public methodStatic member GetDeviceHeight Microsoft internal use only.
Public methodStatic member GetDeviceLeft Microsoft internal use only.
Public methodStatic member GetDeviceRect Microsoft internal use only.
Public methodStatic member GetDeviceTop Microsoft internal use only.
Public methodStatic member GetDeviceWidth Microsoft internal use only.
Public methodStatic member LogicalToDeviceUnits(Point) Converts the specified coordinates from logical units to device units.
Public methodStatic member LogicalToDeviceUnits(PointF) Converts the specified coordinates from logical units to device units.
Public methodStatic member LogicalToDeviceUnits(Rectangle) Converts the specified coordinates from logical units to device units.
Public methodStatic member LogicalToDeviceUnits(RectangleF) Converts the specified coordinates from logical units to device units.
Public methodStatic member LogicalToDeviceUnits(Size) Converts the specified coordinates from logical units to device units.
Public methodStatic member LogicalToDeviceUnits(SizeF) Converts the specified coordinates from logical units to device units.
Public methodStatic member LogicalToDeviceUnits(Point) Converts the specified coordinates from logical units to device units.
Public methodStatic member LogicalToDeviceUnits(Rect) Microsoft internal use only.
Public methodStatic member LogicalToDeviceUnits(Size) Microsoft internal use only.
Public methodStatic member LogicalToDeviceUnits(Thickness)
Public methodStatic member LogicalToDeviceUnits(Bitmap%, ImageScalingMode) Converts the specified coordinates from logical units to device units.
Public methodStatic member LogicalToDeviceUnits(Icon%, ImageScalingMode)
Public methodStatic member LogicalToDeviceUnits(Image%, ImageScalingMode) Converts the specified coordinates from logical units to device units.
Public methodStatic member LogicalToDeviceUnits(ImageList%, ImageScalingMode) Converts the specified coordinates from logical units to device units.
Public methodStatic member LogicalToDeviceUnits(Bitmap%, Color, ImageScalingMode) Converts the specified coordinates from logical units to device units.
Public methodStatic member LogicalToDeviceUnits(Bitmap%, Size, ImageScalingMode) Converts the specified coordinates from logical units to device units.
Public methodStatic member LogicalToDeviceUnits(Image%, Color, ImageScalingMode) Converts the specified coordinates from logical units to device units.
Public methodStatic member LogicalToDeviceUnits(ImageList%, Color, ImageScalingMode) Converts the specified coordinates from logical units to device units.
Public methodStatic member LogicalToDeviceUnits(Bitmap%, Size, Color, ImageScalingMode) Converts the specified coordinates from logical units to device units.
Public methodStatic member LogicalToDeviceUnitsX(Double) Returns the closest value in logical units that are converted to an integer value when converted to horizontal device units.
Public methodStatic member LogicalToDeviceUnitsX(Int32) Returns the closest value in logical units that are converted to an integer value when converted to horizontal device units.
Public methodStatic member LogicalToDeviceUnitsX(Single) Returns the closest value in logical units that are converted to an integer value when converted to horizontal device units.
Public methodStatic member LogicalToDeviceUnitsY(Double) Returns the closest value in logical units that will be converted to an integer value when converted to vertical device units.
Public methodStatic member LogicalToDeviceUnitsY(Int32) Returns the closest value in logical units that will be converted to an integer value when converted to vertical device units.
Public methodStatic member LogicalToDeviceUnitsY(Single) Returns the closest value in logical units that will be converted to an integer value when converted to vertical device units.
Public methodStatic member RoundToDeviceUnitsX Returns the closest value in logical units that will be converted to an integer value when converted to horizontal device units.
Public methodStatic member RoundToDeviceUnitsY Returns the closest value in logical units that will be converted to an integer value when converted to vertical device units.
Public methodStatic member SetDeviceHeight Microsoft internal use only.
Public methodStatic member SetDeviceLeft Microsoft internal use only.
Public methodStatic member SetDeviceTop Microsoft internal use only.
Public methodStatic member SetDeviceWidth Microsoft internal use only.

Top

Thread Safety

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

See Also

Reference

Microsoft.VisualStudio.PlatformUI Namespace