Skip to main content
.NET Framework 4.6.2+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

WindowController.SetWindow(Window) Method

Sets a specified Window for a Window Controller.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

#Declaration

public void SetWindow(
    Window newWindow
)

#Parameters

Name Type Description
newWindow Window

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

#Remarks

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