Search
WindowBase.windowOpen Event
See Also
 






Raised when the Window is opened.

Namespace: MindFusion.Common.UI
File: WindowBase.js

 Syntax

JavaScript  Copy Code

EventDispatcher windowOpen

 Event Data

The event handler method receives the following arguments:
sender
A WindowBase instance, which is the source of the event. This object will be passed to the handler function as the first argument.
args
A ControlModifiedEventArgs instance, which contains event data. This object will be passed to the handler function as the second argument.

 Example

The following code handles the windowOpen event of a Window class. The event handler checks the state of the Window and restores it to normal size, if it is minimized.

JavaScript  Copy Code

var u = MindFusion.Common.UI;

window.windowOpen.addEventListener(windowOpenEventHandler);

function windowOpenEventHandler(sender, args)
{
  //if the window is minimized
  if(sender.windowState === u.WindowState.Minimized)
      sender.restore();
}

 See Also