Templates
- 2 minutes to read
Templates define the appearance of Windows and Frames in applications. They contain elements like Action Containers and a View site. Built-in Templates let developers focus on business logic instead of designing a UI from scratch. You can customize or replace default templates as needed.
The XAF includes the following built-in Templates:
Refer to the following topic to learn how to customize the default Templates:
How It Works
A Template is a control that implements the IFrameTemplate or IWindowTemplate interface. These interfaces provide methods that specify a Template’s Action Containers collection, and assign a View to be displayed.
The IWindowTemplate interface is inherited from the IFrameTemplate interface. The difference is that the IWindowTemplate interface additionally provides a store for status messages, a Template’s caption and a flag indicating whether it should be sizeable. This means that a Template that implements the IWindowTemplate interface behaves like a standard form.
The controls that are used to display List and Detail Views support end-user customization. For instance, in WinForms applications, users can customize the layout of toolbars, columns in grid controls, controls in detail forms, etc. All built-in Windows Forms Templates are designed to save these end-user customizations to the Application Model, so changes made will persist between application runs.