MindFusion.UI for WebForms Programmer's Guide

Window

The Window control derives from WindowBase and represents a window with header, content and status bar. The content of the Window can be either a Template or a web page, displayed within a generated IFrame object. Windows within the WindowHost can be free-floating, minimized, maximized or pinned in position.

Server side

  • Customizing the control
    Like all controls derived from WindowBase, choosing the content of the control is done by either specifying a Template or by setting the NavigateUrl property. Set the EnabledInteractions property to predefine the available user interactions on the control. Use WindowState and Visibility to determine the initial state of the control. Chose which parts of the window are shown by setting WindowStyle. Style the control through ThemeHeaderCssClass, ContentCssClass, FooterCssClass and/or StatusCssClass. Specify constrains through MinWidth and MinHeight or let the control size itself according to its content through AutoSize

    ASPX  Copy Code

    <%-- Window1 is in the default state - all interactions are enabled, it is visible and in normal state. --%>
    <ui:Window ID="Window1" runat="server" Title="Window1"></ui:Window>

    <%-- Window2 is minimized, visible and with resizing and pinning disabled. --%>
    <ui:Window ID="Window2" runat="server" Title="Window2" WindowState="Minimized" EnabledInteractions="Drag, Minimize, Maximize, Refresh, Close"></ui:Window>

    <%-- Window3 will not be shown. --%>
    <ui:Window ID="Window3" runat="server" Title="Window3" Visibility="Hidden"></ui:Window>


    Note

    For additional information on templating the content of the Window control, please refer to the Templates topic.

  • Events
    The following events are exposed by the Window control.

    Event

    Event arguments

    Description

    Close

    WindowEventArgs

    Raised when a Window is closed.

Client side

  • Getting a reference to the control
    Commonly the Window control should be placed inside a WindowHost parent control. Access it from its getAllWindows method or directly by it's ClientID.

    JavaScript  Copy Code

    // through the parent WindowHost
    var windowHost = $find("WindowHost1");
    var window = windowHost.getAllWindows()[0];
    // directly
    var window = $find("<%= Window1.ClientID %>");


  • Manipulating windows
    Use the minimizerestore, close and show methods to respectively minimize, restore, close or show the window. Use the set_enabledInteractions method to define the possible user interactions on the control. Refresh the internal iframe or change the displayed web page by set_navigateUrl.

  • Events
    The following client-side events are exposed by the Window class.

Event

Event arguments

Script property

Description

dragStart

WindowValidatingEventArgs

DragStartScript

Raised when the user starts to drag a control with the mouse.

drag

WindowModifiedEventArgs

DragScript

Raised during a drag operation.

dragEnd

WindowModifiedEventArgs

DragEndScript

Raised when the user finishes to drag a control with the mouse.

resizeStart

WindowValidatingEventArgs

ResizeStartScript

Raised when the user starts to resize a control with the mouse.

resize

WindowModifiedEventArgs

ResizeScript

Raised during a resize operation.

resizeEnd

WindowModifiedEventArgs

ResizeEndScript

Raised when the user finishes to resize a control with the mouse.

opening

WindowValidatingEventArgs

OpeningScript

Raised when a window is about to open.

open

WindowEventArgs

OpenScript

Raised when a window has opened.

closing

WindowValidatingEventArgs

ClosingScript

Raised when a window is about to close.

close

WindowEventArgs

CloseScript

Raised when a window has closed.

stateChanging

WindowStateValidatingEventArgs

StateChangingScript

Raised when the window state is currently changing.

stateChanged

WindowStateEventArgs

StateChangedScript

Raised when the window state has changed

headerClick

WindowEventArgs

HeaderClickScript

Raised when the user clicks the window header.

frameLoaded

-

FrameLoadedScript

Raised when the internal iframe has finished loading.

controlLoaded

-

ControlLoadedScript

Raised just after the control has finished loading and is ready for interaction.