Class DisplayScales
Provides static methods to get the display-scale provider for the current platform.
public static class DisplayScales
- Inheritance
-
DisplayScales
- Inherited Members
Methods
GetPlatformProvider()
Gets the display-scale provider for the current platform.
public static IDisplayScaleProvider GetPlatformProvider()
Returns
- IDisplayScaleProvider
An instance of the IDisplayScaleProvider interface for the current platform.
Exceptions
- PlatformNotSupportedException
The current platform has no display-scale provider.
GetProvider()
Gets the display-scale provider for the current platform, or a FixedDisplayScaleProvider
reporting 1.0 when the platform has none.
public static IDisplayScaleProvider GetProvider()
Returns
- IDisplayScaleProvider
A display-scale provider; never null.
TryGetPlatformProvider(out IDisplayScaleProvider?)
Tries to get the display-scale provider for the current platform.
public static bool TryGetPlatformProvider(out IDisplayScaleProvider? provider)
Parameters
providerIDisplayScaleProviderThe provider for the current platform, or null if there is none.