Search
WindowHost.windowStateChanged Event
See Also
 






Raised when the state of a child window is modified.

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

 Syntax

JavaScript  Copy Code

EventDispatcher windowStateChanged

 Event Data

The event handler method receives the following arguments:
sender
A WindowHost 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 creates a new WindowHost and handles its windowStateChanged event:

JavaScript  Copy Code

// create a new instance of the WindowHost control
var host = new ui.WindowHost(document.getElementById("host"));
host.width = host.height = new ui.Unit(100, ui.UnitType.Percent);
host.theme = "standard";
host.windowStateChanged.addEventListener(handleWindowStateChanged);
host.render();

function handleWindowStateChanged(sender, args)
{
     if(sender.windowState == ui.WindowState.Minimized)
     {
          host.closeAll();
     }
}

 See Also