Search
WindowBase.windowOpening Event
See Also
 






Raised when the Window is opening.

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

 Syntax

JavaScript  Copy Code

EventDispatcher windowOpening

 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 ControlModifyingEventArgs instance, which contains event data. This object will be passed to the handler function as the second argument.

 Example

The following code handles the windowOpening event of a Window class.

JavaScript  Copy Code

var u = MindFusion.Common.UI;

window.windowOpening.addEventListener(windowOpeningEventHandler);

function windowOpeningEventHandler(sender, args)
{
  //if the window is minimized
  if(args.changes.windowState === u.WindowState.Minimized)
      args.cancel = true;
}

 See Also