Skip to main content

ON Members

A helper class that allows you to identify device parameters: operating system type, orientation, form factor, and device type (physical device or simulator).

Properties

Name Description
Android static Indicates whether the app is launched on a device running Android.
DefaultScreenExtraLargeThreshold static The default minimum size for devices with screens of the Extra Large size class.
DefaultScreenLargeThreshold static The default minimum size for devices with screens of the Large size class.
DefaultScreenMediumThreshold static The default minimum size for devices with screens of the Medium size class.
DefaultScreenSmallThreshold static The default minimum size for devices with screens of the Small size class.
iOS static Indicates whether the app is launched on a device running iOS.
Landscape static Indicates whether the app is displayed in the Landscape orientation.
Phone static Indicates whether the app is running on a phone.
Portrait static Indicates whether the app is displayed in the Portrait orientation.
Simulator static Indicates whether the app is running on a simulator/emulator.
Tablet static Indicates whether the app is running on a tablet.

Methods

Name Description
DeviceType<T>(T, T) static Selects the value of a reference type to be applied depending on the device type.
DisplaySize<T>(T, T, T, T, T, Nullable<Size>, Nullable<Size>, Nullable<Size>, Nullable<Size>) static Selects the value of a reference type to be applied depending on the device screen size.
DisplaySize<T>(Nullable<T>, Nullable<T>, Nullable<T>, Nullable<T>, Nullable<T>, Nullable<Size>, Nullable<Size>, Nullable<Size>, Nullable<Size>) static Selects the value of a value type to be applied depending on the device screen size.
Equals(Object, Object) static Determines whether the specified object instances are considered equal. Inherited from Object.
Equals(Object) Determines whether the specified object is equal to the current object. Inherited from Object.
GetHashCode() Serves as the default hash function. Inherited from Object.
GetType() Gets the Type of the current instance. Inherited from Object.
Idiom<T>(T, T) static Selects the value to be applied depending on the device type on which the app is running.
MemberwiseClone() protected Creates a shallow copy of the current Object. Inherited from Object.
Orientation<T>(T, T) static Selects the value to be applied depending on the screen orientation.
OrientationChanged<T>(T, Action<T>) static Allows you to perform custom actions when the screen orientation changes.
Platform<T>(T, T) static Selects the value to be applied depending on the platform on which the app is running.
ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance. Inherited from Object.
ScreenHeight<T>(T, T, T, T, T, Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>) static Selects the value of a reference type to be applied depending on the device screen size.
ScreenHeight<T>(Nullable<T>, Nullable<T>, Nullable<T>, Nullable<T>, Nullable<T>, Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>) static Selects the value of a value type to be applied depending on the screen height.
ScreenWidth<T>(T, T, T, T, T, Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>) static Selects the value of a reference type to be applied depending on the screen width.
ScreenWidth<T>(Nullable<T>, Nullable<T>, Nullable<T>, Nullable<T>, Nullable<T>, Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>) static Selects the value of a value type to be applied depending on the screen width.
ToString() Returns a string that represents the current object. Inherited from Object.
See Also