Back to Devexpress

TemplateContext.View Property

expressappframework-devexpress-dot-expressapp-dot-templatecontext-9723d03e.md

latest4.1 KB
Original Source

TemplateContext.View Property

Represents the view Template context.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
public static TemplateContext View { get; }
vb
Public Shared ReadOnly Property View As TemplateContext

Property Value

TypeDescription
TemplateContext

A TemplateContext object, representing the view Template context.

|

Remarks

For a general description of Template contexts, refer to the TemplateContext structure description.

The following code snippets (auto-collected from DevExpress Examples) contain references to the View 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.

XAF_how-to-show-filter-dialog-before-listview/CS/EFCore/DialogBeforeListViewEF/DialogBeforeListViewEF.Module/Controllers/ShowFilterDialogController.cs#L18

csharp
base.OnActivated();
if(Frame.Context == TemplateContext.ApplicationWindow || Frame.Context == TemplateContext.View) {
    showFilterDialogAction.Active[DisableReason] = true;

xaf-how-to-create-information-panels/CS/InfoPanels.Win/Program.cs#L41

csharp
e.Template = new InfoPanels.Module.Win.MainForm();
if (e.Context == TemplateContext.View)
    e.Template = new InfoPanels.Module.Win.DetailViewForm();

xaf-win-custom-button-in-lookup-property-editor/CS/WinSolution.Module.Win/MyLookupPropertyEditor.cs#L34

csharp
svp.TargetWindow = TargetWindow.Default;
svp.Context = TemplateContext.View;
svp.CreateAllControllers = true;

xaf-how-to-create-information-panels/VB/InfoPanels.Win/Program.vb#L43

vb
End If
If e.Context = TemplateContext.View Then
    e.Template = New DetailViewForm()

xaf-win-custom-button-in-lookup-property-editor/VB/WinSolution.Module.Win/MyLookupPropertyEditor.vb#L41

vb
svp.TargetWindow = TargetWindow.Default
svp.Context = TemplateContext.View
svp.CreateAllControllers = True

See Also

Template Customization

Templates

TemplateContext Struct

TemplateContext Members

DevExpress.ExpressApp Namespace