Interface IDeviceInfo
Provides information about the current device, platform, and user preferences.
Resolved via this.GetService<IDeviceInfo>() from any View.
The emulator replaces this with a mock to simulate phone or tablet form factors.
public interface IDeviceInfo
Properties
AccessibilityFontScale
Accessibility font scale multiplier (1.0 = default).
NFloat AccessibilityFontScale { get; }
Property Value
ColorScheme
Light or dark appearance preference.
ColorScheme ColorScheme { get; }
Property Value
FormFactor
Gets the form factor of the current device.
DeviceFormFactor FormFactor { get; }
Property Value
Platform
Gets the operating system the app is running on.
DevicePlatform Platform { get; }
Property Value
PointerModel
Gets the primary pointing device available to the user.
PointerModel PointerModel { get; }
Property Value
PrefersHighContrast
True if the user has requested high-contrast mode.
bool PrefersHighContrast { get; }
Property Value
PrefersReducedMotion
True if the user has requested reduced motion.
bool PrefersReducedMotion { get; }