Vue Common - Utils - devices - Methods

This section describes the methods exposed by the DevExpress.devices namespace.

current()

Gets information on the current device.

Return Value:

Device

Information on the current device.

The device information provided by this function may differ from the actual device on which the application is running if an emulated device is specified for the application (see DevExpress.devices.current(deviceName)). The actual information about the device is available via the DevExpress.devices.real() function.

current(deviceName)

Overrides actual device information to force the application to operate as if it was running on a specified device.

Parameters:
deviceName:

String

|

Device

The required device name or an object specifying platform information.

The string values accepted by the input parameter are: "iPhone", "iPhone5", "iPhone6", "iPhone6plus", "iPad", "iPadMini", "androidPhone", "androidTablet", "genericPhone", "msSurface" and "desktop". The method can also take on an object containing more detailed information on the current platform.

NOTE
The following values were deprecated: "win10" and "win10Phone". In new applications, use the string values listed above.

off(eventName)

Detaches all event handlers from a single event.

Parameters:
eventName:

String

The event's name.

Return Value: Utils

The object for which this method is called.

See Also

off(eventName, eventHandler)

Detaches a particular event handler from a single event.

Parameters:
eventName:

String

The event's name.

eventHandler:

Function

The event's handler.

Return Value: Utils

The object for which this method is called.

See Also

on(eventName, eventHandler)

Subscribes to an event.

Parameters:
eventName:

String

The event's name.

eventHandler:

Function

The event's handler.

Return Value: Utils

The object for which this method is called.

Use this method to subscribe to one of the events listed in the Events section.

See Also

on(events)

Subscribes to events.

Parameters:
events:

Object

Events with their handlers: { "eventName1": handler1, "eventName2": handler2, ...}

Return Value: Utils

The object for which this method is called.

Use this method to subscribe to several events with one method call. Available events are listed in the Events section.

See Also

orientation()

Returns the current device orientation.

Return Value:

String

The current device orientation: "portrait" or "landscape".

real()

Returns real information about the current device regardless of the value passed to the DevExpress.devices.current(deviceName) method.

Return Value:

Device

Information about the current device.