Skip to main content
A newer version of this page is available. .

XafApplication.CreateCustomTemplate Event

Occurs when creating a Template.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v18.2.dll

Declaration

public event EventHandler<CreateCustomTemplateEventArgs> CreateCustomTemplate

Event Data

The CreateCustomTemplate event's data class is CreateCustomTemplateEventArgs. The following properties provide information specific to this event:

Property Description
Application Provides access to the XafApplication object.
Context Returns the context in which a Template is created.
Template Specifies the Template which is created in a XafApplication.CreateCustomTemplate event handler.

Remarks

In Windows Forms applications, this event is raised when a Window is created. Handle this event to create a custom Template for this Window. For this purpose, use the handler’s CreateCustomTemplateEventArgs.Context parameter to create a custom Template for a particular context. For details, refer to the Template Customization, How to: Create a Custom WinForms Ribbon Template and How to: Create a Custom WinForms Standard Template topics.

In ASP.NET Web applications, Templates represent pages that implement the IFrameTemplate or IWindowTemplate interface. If a page, which is being loaded, does not implement one of these interfaces, the CreateCustomTemplate event is raised. Handle this event, to create a Web control that implements the IFrameTemplate or IWindowTemplate interface.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CreateCustomTemplate event.

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