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 Theme, HeaderCssClass, 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
|
---|
<%%> <ui:Window ID="Window1" runat="server" Title="Window1"></ui:Window> <%%> <ui:Window ID="Window2" runat="server" Title="Window2" WindowState="Minimized" EnabledInteractions="Drag, Minimize, Maximize, Refresh, Close"></ui:Window> <%%> <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. |
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
|
---|
var windowHost = $find("WindowHost1"); var window = windowHost.getAllWindows()[0];
var window = $find("<%= Window1.ClientID %>");
|
- Manipulating windows
Use the minimize, restore, 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.
|