Click or drag to resize

Window Class

A window that can be controlled by the AppDesktop API.

Window objects are available through application.getWindow(). This class can not be instantiated directly.

Inheritance Hierarchy
SystemObject
  Openfin.DesktopWebContents
    Openfin.DesktopWindow

Namespace:  Openfin.Desktop
Assembly:  OpenfinDesktop (in OpenfinDesktop.dll) Version: 17.6.0
Syntax
C#
public sealed class Window : WebContents, 
	IOpenfinEntity, IDisposable

The Window type exposes the following members.

Constructors
  NameDescription
Public methodWindow(Application) Obsolete.
Window Constructor.
Public methodWindow(String, String, DesktopConnection) Obsolete.
Attaches a Window object to an application Window that already exists.
Top
Properties
  NameDescription
Public propertyApplication
Gets the Application that created the Window.
Public propertyCanNavigateBack
Indicates if back navigation is available.
Public propertyCanNavigateForward
Indicates if forward navigation is available.
Public propertyHandle
Gets the window handle of the OpenFin window
Public propertyIdentity
Public propertyName
Gets the name of the Openfin Window.
Public propertyTitle
Gets the Title of the Openfin Window.
Public propertyUrl
Gets the URL of the Openfin Window.
Top
Methods
  NameDescription
Public methodaddEventListener Obsolete.
Registers an event listener on the specified event.
Public methodadoptWindow
Reparents the passed HWND with the current AppDesktop window.
Public methodanimate
Performs the specified window transitions.
Public methodblur
Removes focus from the window.
Public methodBringParentToFront
Will set the focus on the Parent container, in the case of windows being embeded.
Public methodbringToFront
Brings the window to the front of the window stack.
Public methodclose
Closes the window.
Public methoddisableFrame
Prevents a user from changing a window's size/position when using the window's frame.
Remarks
'disabled-frame-bounds-changing' is generated at the start of and during a user move/size operation. 'disabled-frame-bounds-changed' is generated after a user move/size operation. The events provide the bounds that would have been applied if the frame was enabled. 'frame-enabled' is generated when a disabled frame has becomes enabled.
Public methodDispose
Disposes the current window reference and unhooks all subscribed events.
Public methodembedInto
Embeds a window in a target hWin
Public methodenableFrame
Re-enables user changes to a window's size/position when using the window's frame.
Remarks
'disabled-frame-bounds-changing' is generated at the start of and during a user move/size operation. 'disabled-frame-bounds-changed' is generated after a user move/size operation. The events provide the bounds that would have been applied if the frame was enabled. 'frame-enabled' is generated when a disabled frame has becomes enabled.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodexecuteJavascript
Executes JavaScript on the content of the Window
Public methodExecuteJavascriptAsync (Inherited from WebContents.)
Public methodFindInPageAsync (Inherited from WebContents.)
Public methodflash
Draws attention to the window by flashing the taskbar and window caption.

This effect continues until explicitly removed by calling stopFlashing

Public methodfocus
Gives focus to the window.
Public methodFocusAsync (Inherited from WebContents.)
Public methodgetBounds
Gets the current bounds (top, left, width, height) of the window.
Public methodgetGroup Obsolete.
Passes a list of wrapped windows in the same group.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodgetName Obsolete.
Returns the name of the window As registered with the AppDesktop.
Public methodgetNativeId
Gets the window's platform specific identifier.
Public methodgetOptions
Returns the current options as stored in the desktop.
Public methodgetParentApplication Obsolete.
Returns the wrapped application that this window belongs to.
Public methodgetParentWindow
Returns the wrapped main window of the application that this window belongs to.
Public methodGetPrintersAsync (Inherited from WebContents.)
Public methodgetSnapshot
Gets a base64 encoded PNG snapshot of the window.
Public methodgetState
Gets the current state ("minimized", "maximized", or "restored") of the window.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodgetUuid Obsolete.
Returns the parent Application's UUID.
Public methodGetViewsAsync
Gets all active platform views for a window.
Public methodgetZoomLevel
Gets the current zoom level of the window
Public methodGetZoomLevelAsync (Inherited from WebContents.)
Public methodhide
Hides the window.
Public methodisShowing
Determines if the window is currently showing.
Public methodjoinGroup Obsolete.
Joins the same window group as the specified window.
Public methodleaveGroup Obsolete.
Leaves the current window group so that the window can be move independently of those in the group.
Public methodmaximize
Maximizes the window.
Public methodmergeGroups Obsolete.
Merges the instance's window group with the same window group as the specified window.
Public methodminimize
Minimizes the window.
Public methodmoveBy
Moves the window by a specified amount.
Public methodmoveTo
Moves the window to a specified location.
Public methodmoveToSync
Moves the window to a specified location. synchronously
Public methodnavigate
Navigates the Widnow to the specified address.
Public methodNavigateAsync (Inherited from WebContents.)
Public methodnavigateBack
Navigates the Widnow to the previous content.
Public methodNavigateBackAsync (Inherited from WebContents.)
Public methodnavigateForward
Navigates the Widnow to the forward content.
Public methodorphanWindow
Unparents the window identified by HWND and moves it to left, top.
Public methodparentWindowMovedCalibration
In an embedded window scenario, when the parent window moves there is calibration needed.
Public methodparentWindowMoveStartCalibration
In an embedded window scenario, when the parent window starts to move there is calibration needed.
Public methodPrintAsync (Inherited from WebContents.)
Public methodrefresh
Causes the Window to refresh.
Public methodreload
Reloads the Widnow content.
Public methodReloadAsync (Inherited from WebContents.)
Public methodremoveEventListener Obsolete.
Removes a previously registered event listener from the specified event.

The listener is passed an event object containing information related to the event.

Public methodresizeBy(Int32, Int32, AckCallback, AckCallback)
Resizes the window by the specified amount with a "top-left" anchor
Public methodresizeBy(Int32, Int32, String, AckCallback, AckCallback)
Resizes the window by the specified amount.
Public methodresizeTo(Int32, Int32, AckCallback, AckCallback)
Resizes the window to the specified dimensions with a "top-left" anchor.
Public methodresizeTo(Int32, Int32, String, AckCallback, AckCallback)
Resizes the window to the specified dimensions.
Public methodrestore
Restores the window to its normal state (i.e., unminimized, unmaximized).
Public methodsetAsForeground
Set's the window as the foreground window.

The window is activated(focused) and brought to front.

Public methodsetBounds
Set's the bounds (top, left, width, height) of the window.
Public methodsetZoomLevel
Sets the zoom level of the window
Public methodshow
Shows the window if it is hidden.
Public methodshowAt
Shows the window if it is hidden at the specified location.

If the toggle parameter is set to true, the window will alternate between showing and hiding.

Public methodshowDeveloperTools
Shows window's developer tools.
Public methodShowDeveloperToolsAsync (Inherited from WebContents.)
Public methodStopFindInPageAsync (Inherited from WebContents.)
Public methodstopFlashing
Removes a flashing taskbar/window caption effect if present.
Public methodStopNavigationAsync (Inherited from WebContents.)
Public methodstopWindowNavigation
Stops currently loading Widnow content.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodupdateOptions
Changes a window's options that were defined upon creation.
Public methodStatic memberwrap Obsolete.
Attaches a Window object to an application Window that already exists.
Top
Events
  NameDescription
Public eventAuthenticationRequested
Occurs when the window has requested authentication credentials.
Public eventBlurred
Occurs when the window loses focus and is no longer active.
Public eventClosed
Occurs when the window has been closed.
Public eventCloseRequested
Occurs when a window is requesting to be closed.
Public eventConnected
Occurs when the window has connected to the OpenFin runtime.
Public eventCrashed
Occurs when the window has creashed.
Public eventDOMContentLoaded
Occurs when the window DOM content has loaded.
Public eventEmbedded
Occurs when the window was embedded.
Public eventExternalProcessExited
Occurs when the external prcess has exited.
Public eventExternalProcessStarted
Occurs when the external prcess was started.
Public eventFocused
Occurs when the window is activated or received focus.
Public eventFrameDisabled
Occurs when the window frame is disabled.
Public eventFrameEnabled
Occurs when the window frame is enabled.
Public eventHidden
Occurs when the window is hidden.
Public eventInitialized
Occurs when the window has been initialized.
Public eventLoadFailed
Occurs when the window has failed to load a requested resource.
Public eventMaximized
Occurs when the window is maximized.
Public eventMinimized
Occurs when the window is minimized.
Public eventNavigationRejected
Occurs when navigation was rejected.
Public eventNotResponding
Occurs when the window is not responding.
Public eventOutOfMemory
Occurs when the process ran out of memory.
Public eventPlatformLayoutInitialized
Occurs when the window and all of its layout's views have either finished or failed navigation.
Public eventPlatformLayoutReady
Occurs when the window when the window and all of its layout's views have been created and can receive API calls.
Public eventPreloadScriptsEvaluated
Occurs when the Runtime has attempted to evaluate all preload scripts for the window.
Public eventPreloadScriptStateChanged
Occurs when a preload script has changed state.
Public eventReloaded
Occurs when the window has been reloaded.
Public eventResponding
Occurs when the window is responding following a not responding event.
Public eventResponseReceived
Occurs when the window has received an HTTP resource response.
Public eventRestored
Occurs when the window is restored.
Public eventShown
Occurs when the window is shown.
Public eventShowRequested
Occurs when a window is requesting to be shown.
Public eventViewAttached
Occurs when a window has a view attached to it.
Top
See Also