DeviceWindows

Wisej.Hybrid.DeviceWindows

Namespace: Wisej.Hybrid

Assembly: Wisej.Hybrid (3.5.0.0)

Provides methods to interact with device windows.

public class DeviceWindows

Access this class through the Device singleton.

Constructors

DeviceWindows()

Initializes a new instance of DeviceWindows.

Methods

GetOpenWindows()

Gets an array of open window ids.

Returns: String[]. The ids.

TryClose(id)

Tries to close a window with the given id.

Parameter
Type
Description

id

The window id.

Returns: Boolean. True if the window was successfully closed.

TryOpen(url, title, location, size, minimumSize, maximumSize)

Tries to open a new window with the given URL.

Parameter
Type
Description

url

The URL to open.

title

The title of the window.

location

The location of the window.

size

The size of the window.

minimumSize

The minimum size of the window.

maximumSize

The maximum size of the window.

Returns: String. The ID of the new window or null if not created.

TryPostMessage(id, data)

Tries to post a message to the given window id with the given payload.

Parameter
Type
Description

id

The window id.

data

The data to post.

Returns: Boolean. True if the message was sent successfully.

TrySetTitle(id, title)

Tries to set the title for the given window.

Parameter
Type
Description

id

The window id.

title

The new title of the window.

Returns: Boolean. True if the action succeeded.

Events

ClosedWindow

EventHandler<String> Fires when a window is closed.

NewWindow

EventHandler<String> Fires when a new window is created and shown.

ReceivedMessage

EventHandler<String> Fires when the current window receives a message from another window.

Last updated