Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]ASP.NET WebForms Controls
 [Collapse]ASP.NET MVC Extensions
  [Expand]Product Information
  [Expand]Getting Started
  [Expand]Common Concepts
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]HTML Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Collapse]Navigation and Layout Extensions
   [Expand]FormLayout
   [Expand]Menu
   [Expand]NavBar
   [Expand]Ribbon
   [Collapse]PageControl
     Overview - PageControl
    [Collapse]Concepts
      Tab Layout Customization
      Callbacks
      Templates
    [Expand]Visual Elements
   [Expand]TabControl
   [Expand]PopupMenu
   [Expand]Splitter
   [Expand]TreeView
   [Expand]Panel
  [Expand]File Management
  [Expand]Multi-Use Site Extensions
  [Expand]Charts
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Tree List
  [Expand]Data Editor Extensions
  [Expand]Report Extensions
  [Expand]SpellChecker
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Templates

PageControl supports template technology allowing you to completely customize the tab header appearance. The look of the tabs can be completely modified by creating a specific template, defining how an element will be rendered by a client browser.

PageControl allows you to create templates for active and inactive tabs. You can apply templates for all tabs within PageControl (using extension level templates) or for a particular tab (using tab level templates). Additionally, you can create templates for a space before tabs and a space after tabs.

The table below lists the members used to create templates.

Tab level templates Extension level templates
Active tab content templates MVCxTabPage.SetActiveTabTemplateContent PageControlSettings.SetActiveTabTemplateContent
Inactive tab content templates MVCxTabPage.SetTabTemplateContent PageControlSettings.SetTabTemplateContent
Space before tabs template - TabControlSettingsBase.SetSpaceBeforeTabsContent
Space after tabs template - TabControlSettingsBase.SetSpaceAfterTabsContent

Note that templates created at a tab level override extension level templates.

 

Expanded Example: Creating Templates

This example demonstrates how a template can be defined in a view. The result is shown by the first image in this topic (see it above).

View code (ASPX):

View code (Razor):

View code - "TemplatesTab.ascx" (ASPX):

View code - "TemplatesTab.ascx" (Razor):

View code - "TemplatesActiveTab.ascx" (ASPX):

View code - "TemplatesActiveTab.ascx" (Razor):

How would you rate this topic?​​​​​​​