ShowViewParameters.Context Property
Namespace: DevExpress.ExpressApp
Assembly: DevExpress.ExpressApp.v24.2.dll
NuGet Package: DevExpress.ExpressApp
Declaration
Property Value
Type | Description |
---|---|
TemplateContext | A TemplateContext object that represents a Template context for the target View’s Window. |
Remarks
All Windows are created in a particular context. For example, the main Window is created in the TemplateContext.ApplicationWindow context. In Windows Forms applications, a Template to be set to a Window is determined via the context. Use the Context property to get or set a context for the Window which will contain the target View. The property’s value will be considered by the Windows Form’s ShowViewStrategy under the following conditions:
- The ShowViewParameters.TargetWindow property is set to NewWindow.
- The ShowViewParameters.TargetWindow property is set to NewModalWindow.
- The ShowViewParameters.TargetWindow property is set to Default, and the current Frame is a nested Frame.
By default, the Context property is set to the TemplateContext.Undefined context. In this case, the target View will be displayed in a separate Window with the TemplateContext.PopupWindow Template context, if the ShowViewParameters.Controllers collection contains one or more Controllers; otherwise, the Windows will be displayed in the TemplateContext.View Template context.
In ASP.NET Web Forms applications, the target View is displayed either in a pop-up Window with the TemplateContext.PopupWindow Template context and a DialogController added, or in the same Window (Frame).