Templates

Templates define what Windows and Frames look like. For instance, built-in Templates contain Action Containers and a View site. When you build an application, ready-to-use Templates help you concentrate on the business model and logic, instead of having to create a UI from scratch. If necessary, you can customize the default Templates or replace them with your own. This topic describes the built-in Template types. Refer to the Template Customization topic to learn how to customize the default Templates.

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 or not 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, end-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.

The eXpressApp Framework uses built-in Templates for automatic UI construction in WinForms, ASP.NET Web and Mobile applications. These Templates are listed below.

WinForms Application Templates

Image

Description

MainFormTemplate

Class: MainForm, Namespace: DevExpress.ExpressApp.Win.Templates.

Displays the main Window. To use this template, set the IModelOptionsWin.FormStyle property to Standard.

LightStyleMainForm

Class: LightStyleMainForm, Namespace: DevExpress.ExpressApp.Win.Templates.

Displays the main Window without excessive borders. To use this template, set the IModelOptionsWin.FormStyle property to Standard and WinApplication.UseLightStyle to true.

MainRibbonFormV2

Class: MainRibbonFormV2, Namespace: DevExpress.ExpressApp.Win.Templates.Bars.

Displays the main Window with the Ribbon form style. To use this template, set the IModelOptionsWin.FormStyle property to Ribbon.

LightStyleMainRibbonForm

Class: LightStyleMainRibbonForm, Namespace: DevExpress.ExpressApp.Win.Templates.

Displays the main Window with the Ribbon form style without excessive borders. To use this template, set the IModelOptionsWin.FormStyle property to Ribbon and WinApplication.UseLightStyle to true.

OutlookStyleMainRibbonForm

Class: OutlookStyleMainRibbonForm, Namespace: DevExpress.ExpressApp.Win.Templates.Ribbon.

Used to display the main Window with the Outlook form style. To use this template, set the IModelOptionsWin.FormStyle property to Ribbon and IModelRootGroupsStyle.RootGroupsStyle to OutlookSimple or OutlookAnimated.

Contact_DetailView

Class: DetailViewForm, Namespace: DevExpress.ExpressApp.Win.Templates.

Displays a Detail View in a new Window. To use this template, set the IModelOptionsWin.FormStyle property to Standard.

DetailRibbonFormTemplate

Class: DetailRibbonFormV2, Namespace: DevExpress.ExpressApp.Win.Templates.Bars.

Displays a Detail View in a new Window with the Ribbon form style. To use this template, set the IModelOptionsWin.FormStyle property to Ribbon.

PopupFormTemplate

Class: PopupForm, Namespace: DevExpress.ExpressApp.Win.Templates.

Used to display pop-up windows with a Detail View. For instance, a logon form is displayed by the PopupForm Template.

LookupFormTempalte

Class: LookupForm, Namespace: DevExpress.ExpressApp.Win.Templates.

Used to display pop-up windows with a List View. For instance, PopupWindowShowAction type Actions use the LookupForm Template to display their pop-up window.

LookupControlTemplate

Class: LookupControlTemplate, Namespace: DevExpress.ExpressApp.Win.Templates.

Used to display a Lookup Property Editor's drop down window.

NestedFrameTemplate

Class: NestedFrameTemplate, Namespace: DevExpress.ExpressApp.Win.Templates.

Used to display a Window or Frame nested into another Window or Frame. For instance, a List Property Editor or Detail Property Editor's window is displayed by the NestedFrameTemplate Template.

Note

Refer to the Toggle the WinForms Ribbon Interface topic to learn how to toggle a Ribbon user interface in your WinForms application.

ASP.NET Web Application Templates

Image

Description

DefaultV2Template

Class: DefaultVerticalTemplateContentNew, Namespace: DevExpress.ExpressApp.Web.Templates.

Used to display the main Window and Detail View Windows (both in view and edit modes).

DialogTemplateV2

Class: DialogTemplateContentNew, Namespace: DevExpress.ExpressApp.Web.Templates.

Used to display a dialog window (e.g., a Lookup Property Editor's drop down window or a PopupWindowShowAction's pop-up window).

FindDialogTemplateContent

Class: FindDialogTemplateContentNew, Namespace: DevExpress.ExpressApp.Web.Templates.

Used to display a dialog window (e.g., a Lookup Property Editor's drop down window or a PopupWindowShowAction's pop-up window) with the records filter.

NestedFrameControlV2

Class: NestedFrameControlNew, Namespace: DevExpress.ExpressApp.Web.Templates.

Used to display a Window (Frame) nested into another Window (Frame), such as a List Property Editor or Detail Property Editor's Frame.

Tutorial_SS_Lesson1_5

Class: LogonTemplateContentNew, Namespace: DevExpress.ExpressApp.Web.Templates.

Used to display a logon Window.

Note

If you use a classic ASP.NET web application style, and want to use the new style instead, call the WebApplication.SwitchToNewStyle method.

Mobile Application Template

Image

Description

MobileWindowTemplate

Class: MobileWindowTemplate, Namespace: DevExpress.ExpressApp.Mobile.Templates.

Used to display all Windows in accordance with the SPA technology.

Classic ASP.NET Web Application Templates

Image

Description

VerticalTemplate

Class: DefaultVerticalTemplateContent, Namespace: DevExpress.ExpressApp.Web.Templates.

Can be used to display the main Window and Detail View Windows (both in view and edit modes). This Template is the main window's standard template with the vertical navigation bar. To learn how to use this template, refer to the ASP.NET Web Application Appearance topic.

DefaultTemplate

Class: DefaultTemplateContent, Namespace: DevExpress.ExpressApp.Web.Templates.

Used to display the main Window and Detail View Windows (both in view and edit modes). This Template is an optional template that has horizontally aligned navigation tabs that conserve the main window's space.

DialogTemplate

Class: DialogTemplateContent, Namespace: DevExpress.ExpressApp.Web.Templates.

Used to display a dialog window (e.g., a Lookup Property Editor's drop down window or a PopupWindowShowAction's pop-up window).

WebNestedTemplate

Class: NestedFrameControl, Namespace: DevExpress.ExpressApp.Web.Templates.

Used to display a Window (Frame) nested into another Window (Frame), such as a List Property Editor or Detail Property Editor's Frame.

LogonTemplate

Class: LogonTemplateContent, Namespace: DevExpress.ExpressApp.Web.Templates.

Used to display a logon Window. Contains the PopupActions Action Container.

ErrorTemplate

Class: ErrorInfoControl, Namespace: DevExpress.ExpressApp.Web.Templates.Controls.

Used to display a Window with a comment about an error.

Note

If you use a new ASP.NET web application theme, and want to use the classic style instead, call the WebApplication.SwitchToOldStyle method.

See Also