Back to Devexpress

CreateCustomTemplateEventArgs.Template Property

expressappframework-devexpress-dot-expressapp-dot-createcustomtemplateeventargs.md

latest3.0 KB
Original Source

CreateCustomTemplateEventArgs.Template Property

Specifies the Template which is created in a XafApplication.CreateCustomTemplate event handler.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
public IFrameTemplate Template { get; set; }
vb
Public Property Template As IFrameTemplate

Property Value

TypeDescription
IFrameTemplate

An object that supports the IFrameTemplate interface. This object represents the created Template.

|

Remarks

When creating a custom Template in a XafApplication.CreateCustomTemplate event handler, assign it to this property to show it instead of a default one.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Template 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-create-information-panels/CS/InfoPanels.Win/Program.cs#L40

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

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

vb
If e.Context = TemplateContext.ApplicationWindow Then
    e.Template = New MainForm()
End If

See Also

CreateCustomTemplateEventArgs Class

CreateCustomTemplateEventArgs Members

DevExpress.ExpressApp Namespace