ComponentOne ASP.NET MVC Controls
TabPanel Class
Members  Example 

C1.Web.Mvc Namespace : TabPanel Class
Defines a control which enables content organization at a high level, such as switching between views, data sets, or functional aspects of an application.
Syntax
'Declaration
 
<ScriptsAttribute(Dependencies=System.Object[], ResExtension=".min.js")>
Public Class TabPanel 
   Inherits Control
   Implements ITemplate 
[Scripts(Dependencies=System.Object[], ResExtension=".min.js")]
public class TabPanel : Control, ITemplate  
Remarks
The TabPanel class helps in initializing the TabPanel control, and defines the following behavior for the control with the help of the class members.

1. The Tabs property is used to define multiple tabs that are displayed in the TabPanel control.

2. The switching between the tabs can be animated by setting the isAnimated property.

3. By default, the first tab is selected and displayed, this can be altered by setting the selectedIndex property to a different tab index.

4. The AutoSwitch property helps in enabling or disabling the keyboard operations used to switch between the tabs and accordingly update the tab content.

5. Enables the user to dynamically update the content associated with the tab header by handling the OnClientSelectedIndexChanged event.
Example
@(Html.C1().TabPanel("#tabPanel1")
    .Tabs(t =>
    {
        t.Add(t1 => t1.Header("#header1").Pane("#tab1"));
        t.Add(t2 => t2.Header("#header2").Pane("#tab2"));
        t.Add(t3 => t3.Header("#header3").Pane("#tab3"));
    })
    .AutoSwitch(true)
    .IsAnimated(true)
    .SelectedIndex(1))
Inheritance Hierarchy

System.Object
   C1.Web.Mvc.Component
      C1.Web.Mvc.Control
         C1.Web.Mvc.TabPanel

See Also

Reference

TabPanel Members
C1.Web.Mvc Namespace