expressappframework-devexpress-dot-expressapp-dot-showviewparameters-658970e7.md
Specifies the type of the Window that displays the target View.
Namespace : DevExpress.ExpressApp
Assembly : DevExpress.ExpressApp.v25.2.dll
NuGet Package : DevExpress.ExpressApp
public TargetWindow TargetWindow { get; set; }
Public Property TargetWindow As TargetWindow
| Type | Default | Description |
|---|---|---|
| TargetWindow | Default |
The type of the target window.
|
Available values:
| Name | Description |
|---|---|
| Default |
The active ShowViewStrategyBase determines the type of Window to display the target View.
| | Current |
The current Window (Frame) displays the target View.
| | NewWindow |
A newly created Window or tab (based on the active ShowViewStrategyBase) displays the target View.
| | NewModalWindow |
A newly created modal Window displays the target View.
|
The TargetWindow property specifies the Window where the CreatedView appears. XAF determines the particular target window type based on the combination of the following settings:
UIType property value)TargetWindowThe following tables list window types that display the target View based on the specified property values.
| TargetWindow | UIType = SingleWindowSDI | UIType = TabbedMDI |
|---|---|---|
Default | - If the current Frame is a Nested Frame, the View is displayed in a new modal Window. | |
| In other cases, the View is displayed in the current Window (Frame). | - If the current Frame is a nested frame or the current Window is a Popup Window, the View is displayed in a new modal Window. | |
| In other cases, the View is displayed in a new tab in the main Window. | ||
Current | The View is displayed in the current Window (Frame). | The View is displayed in the current Window (Frame). |
| If the current Window is the main Window, the View is displayed in a new tab in the main Window. | ||
NewWindow | The View is displayed in a new modal Window. | - If the NewWindowTarget property is set to Default or MdiChild, the View is displayed in a new tab in the main Window. |
Separate, the View is displayed in a new modal Window. |
| NewModalWindow | The View is displayed in a new modal Window. | The View is displayed in a new modal Window. |When the application displays the target view in a modal Window, the Window layout and appearance is defined by the PopupWindowTemplate context. The system adds a DialogController to the Window’s Frame.Controllers collection.
| TargetWindow | UIType = SingleWindowSDI or UIType = MultipleWindowSDI | UIType = StandardMDI or UIType = TabbedMDI |
|---|---|---|
Default | If the current Frame is a Nested Frame, the behavior is equivalent to the NewModalWindow option. | |
| SingleWindowSDI : | ||
If the current Window is the main Window, the behavior is equivalent to the NewWindow option. | ||
| In other cases, the View is displayed in the current Window (Frame). | ||
| MultipleWindowSDI : | ||
| The behavior depends on the View: |
NewWindow option. |
| Current | The View is displayed in the current Window (Frame). | The View is displayed in the current Window (Frame).NewWindow option. |
| NewWindow | The View is displayed in a new separate Window. | - If the NewWindowTarget property is set to Default or MdiChild, the View is displayed in a new MDI child Window (in the StandardMDI UI) or a new tab (in the TabbedMDI UI) in the main Window.Separate, the View is displayed in a new separate Window. |
| NewModalWindow | The View is displayed in a new modal Window. | The View is displayed in a new modal Window. |Note
In ASP.NET Core Blazor applications, if you use ShowViewParameters to display a new window, the application does not refresh the original View after you close the window. In contrast, windows that you create with PopupWindowShowAction update the parent View when you close them.
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.
e.ActionArguments.ShowViewParameters.CreatedView = filterDetailView;
e.ActionArguments.ShowViewParameters.TargetWindow = TargetWindow.NewModalWindow;
DialogController dialogCotnroller = Application.CreateController<DialogController>();
e.ShowViewParameters.Controllers.Add(dialogController);
e.ShowViewParameters.TargetWindow = TargetWindow.NewModalWindow;
}
args.ShowViewParameters.CreatedView = detailView;
args.ShowViewParameters.TargetWindow = TargetWindow.Current;
e.Handled = true;
svp.CreatedView = Helper.Application.CreateDetailView(objectSpace, editedObject, true);
svp.TargetWindow = TargetWindow.Default;
svp.Context = TemplateContext.View;
svp.CreatedView = Helper.Application.CreateDetailView(objectSpace, editedObject, True)
svp.TargetWindow = TargetWindow.Default
svp.Context = TemplateContext.View
See Also