WindowController.SetWindow(Window) Method

Sets a specified Window for a Window Controller.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v18.1.dll

Declaration

public void SetWindow(
    Window newWindow
)
Public Sub SetWindow(
    newWindow As Window
)

Parameters

Type Name Description
Window newWindow

A Window object that represents a Window to be set for the current Window Controller.

Window Controllers are used to perform specific actions with their Window when they are activated (see Controller.Activated). This method sets the Window specified by the Window parameter to the current Window Controller. Not any Window can be set for a Window Controller. If the specified Window does not satisfy to the Window Controller's WindowController.TargetWindowType property, it is not assigned and the Controller is not activated.

Generally, you do not need to use this method. When a Window is created, the WindowController.Window property of all the Window Controllers from its Frame.Controllers library is set to this Window object. You can override the WindowController.OnWindowChanging method that is raised before setting a Window. For instance, you can prohibit activation of the current Window Controller, if it is not intended for the Window which is being set for it.

See Also