The DPI type exposes the following members.
Methods
Name | Description | |
---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() ![]() | getResourceNameForScaling |
Return the resource name [string] with suffix to support current scaling factor equals 100% = no suffix less than or equal 125% = _120DPI less than or equal 150% = _144DPI less than or equal 250% = _192DPI less than or equal 350% = _288DPI less than or equal 450% = _384DPI else no suffix Usage example: You have a graphic resource called "icon.png" with multiple versions to support different scaling factors. Add an appropriate suffix to each filename (resource name) and then use this function to return the correct graphic for the device scaling factor. |
![]() ![]() | getScaledSize |
Will return a size object (width and height) adjusted to the current scaling factor Pass in the base width and height and this function will convert to the display scaling factor |
![]() ![]() | getScalingFactor |
Return the scaling factor (as float) for the current display. Example: 1.25 = 125% 2.00 = 200% etc 4.00 = 400% |
![]() | GetType | (Inherited from Object.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
See Also