Utility methods and properties related to the Target Platform.
public static class Platform
Fields
Declaration
public const float baseDpi = 96F
Field Value
Properties
Whether the current platform supports touch gestures.
Declaration
public static bool isTouchGestureSupported { get; set; }
Property Value
Declaration
public static MagnificationGesture magnificationGesture { get; }
Property Value
Declaration
public static bool magnificationGestureChangedThisFrame { get; set; }
Property Value
mainScreenScale
The main screen scale factor.
The "main" screen is the current screen used at highest priority to display the application window.
Declaration
public static float mainScreenScale { get; }
Property Value
Declaration
public static PanGesture panGesture { get; }
Property Value
Declaration
public static bool panGestureChangedThisFrame { get; set; }
Property Value
The DPI value that should be used in UI-Toolkit PanelSettings
referenceDpi.
This value is the value of dpi divided by the main screen scale factor.
Declaration
public static float referenceDpi { get; }
Property Value
The current system theme.
Declaration
public static string systemTheme { get; }
Property Value
Methods
Run a haptic feedback on the current platform.
Declaration
public static void RunHapticFeedback(HapticFeedbackType feedbackType)
Parameters
Type |
Name |
Description |
HapticFeedbackType |
feedbackType |
The type of haptic feedback to trigger.
|
Events
Declaration
public static event Action<MagnificationGesture> magnificationGestureChanged
Event Type
Declaration
public static event Action<PanGesture> panGestureChanged
Event Type
Event triggered when the system theme changes.
Declaration
public static event Action<string> systemThemeChanged
Event Type