Skip to main content
.NET 6.0+

ShowViewParameters.TargetWindow Property

Specifies the type of the Window that will embed the target View.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v24.1.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public TargetWindow TargetWindow { get; set; }

Property Value

Type Description
TargetWindow

A TargetWindow enumeration value representing the type of the target Window.

Remarks

Use this property to specify in what Window the target View should be displayed. The following table lists the available values, and describes how they are considered by the built-in Windows Forms and ASP.NET Web Forms ShowViewStrategies:

TargetWindow property value

Windows Forms ShowViewStrategy

ASP.NET Web Forms ShowViewStrategy

NewWindow

If the ShowViewParameters.Context property is set to Undefined, and the ShowViewParameters.Controllers collection contains one or more Controllers, the target View will be displayed in a separate Window with the PopupWindow Template context.

If the ShowViewParameters.Context property is set to Undefined, and the ShowViewParameters.Controllers collection in empty, the target View will be displayed in a separate Window with the View Template context.

Otherwise, the target View will displayed in a separate Window with the template context specified by the ShowViewParameters.Context property.

The target View will be displayed in a pop-up window with the PopupWindow Template context. In addition, a DialogController will be added to the Window’s Frame.Controllers collection.

NewModalWindow

The behavior is the same as the NewWindow value, except that the Window will be modal.

The same behavior as the NewWindow value.

Default

If the current Frame (source Frame) is nested, the target View will be displayed in a separate modal Window, as if you had set the NewModalWindow value for the TargetWindow property.

In all other cases, a new Window with the View Template context will be created if the current View is the Detail View. If the current View is List View, the current Window (Frame) will be used to set the targetView.

If the current Frame is a lookup Frame, the target View will be displayed in a pop-up Window with the PopupWindow Template context and a DialogController added.

Otherwise, the current Window(Frame) will be used to set the target View.

Current

The current Window (Frame) will be used to set the target View.

The current Window (Frame) will be used to set the target View.

By default, this property is set to TargetWindow.Default.

To specify a Template for the target Window, use the ShowViewParameters.Context property.

Note

When a window created via PopupWindowShowAction is closed, the original View is automatically refreshed if its data was modified via the pop-up window. If you are displaying a new window via show view parameters in an ASP.NET Web Forms XAF application, the original View is not refreshed.

The following code snippets (auto-collected from DevExpress Examples) contain references to the TargetWindow property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also