# XtraTabPage Class | WinForms Controls | DevExpress Documentation

# XtraTabPage Class

A tab page.

**Namespace**: [DevExpress.XtraTab](/WindowsForms/DevExpress.XtraTab)

        **Assembly**:
        DevExpress.XtraEditors.v26.1.dll

## Declaration

- C#
- VB.NET

                        <section id="tabpanel_syntax_tabid_DevExpress.XtraTab.XtraTabPage-csharp" role="tabpanel" data-tab="tabid-csharp" class="tab-group__tab-content tab-group__tab-content--code" style="display: block">
                            <pre><code data-code-links="{&quot;Object&quot;:&quot;https://learn.microsoft.com/dotnet/api/system.object&quot;,&quot;MarshalByRefObject&quot;:&quot;https://learn.microsoft.com/dotnet/api/system.marshalbyrefobject&quot;,&quot;Component&quot;:&quot;https://learn.microsoft.com/dotnet/api/system.componentmodel.component&quot;,&quot;Control&quot;:&quot;https://learn.microsoft.com/dotnet/api/system.windows.forms.control&quot;,&quot;ScrollableControl&quot;:&quot;https://learn.microsoft.com/dotnet/api/system.windows.forms.scrollablecontrol&quot;,&quot;XtraScrollableControl&quot;:&quot;/WindowsForms/DevExpress.XtraEditors.XtraScrollableControl&quot;,&quot;XtraPanel&quot;:&quot;/WindowsForms/DevExpress.XtraEditors.XtraPanel&quot;,&quot;IXtraResizableControl&quot;:&quot;/WindowsForms/DevExpress.Utils.Controls.IXtraResizableControl&quot;}" class="lang-csharp hljs">public class XtraTabPage :&#xA;    XtraPanel,&#xA;    IXtraTabPageExt,&#xA;    IXtraTabPage,&#xA;    IToolTipControlClient,&#xA;    IAnimatedItem,&#xA;    ISupportXtraAnimation,&#xA;    ISupportAdornerElementEx,&#xA;    ISupportAdornerElement,&#xA;    IUpdateAdornerUI,&#xA;    ISupportDXSkinColorsEx,&#xA;    ISupportDXSkinColors</code></pre>
                        </section>
                        <section id="tabpanel_syntax_tabid_DevExpress.XtraTab.XtraTabPage-vb" role="tabpanel" data-tab="tabid-vb" class="tab-group__tab-content tab-group__tab-content--code" style="display: none">
                            <pre><code data-code-links="{&quot;Object&quot;:&quot;https://learn.microsoft.com/dotnet/api/system.object&quot;,&quot;MarshalByRefObject&quot;:&quot;https://learn.microsoft.com/dotnet/api/system.marshalbyrefobject&quot;,&quot;Component&quot;:&quot;https://learn.microsoft.com/dotnet/api/system.componentmodel.component&quot;,&quot;Control&quot;:&quot;https://learn.microsoft.com/dotnet/api/system.windows.forms.control&quot;,&quot;ScrollableControl&quot;:&quot;https://learn.microsoft.com/dotnet/api/system.windows.forms.scrollablecontrol&quot;,&quot;XtraScrollableControl&quot;:&quot;/WindowsForms/DevExpress.XtraEditors.XtraScrollableControl&quot;,&quot;XtraPanel&quot;:&quot;/WindowsForms/DevExpress.XtraEditors.XtraPanel&quot;,&quot;IXtraResizableControl&quot;:&quot;/WindowsForms/DevExpress.Utils.Controls.IXtraResizableControl&quot;}" class="lang-vb hljs">Public Class XtraTabPage&#xA;    Inherits XtraPanel&#xA;    Implements IXtraTabPageExt,&#xA;               IXtraTabPage,&#xA;               IToolTipControlClient,&#xA;               IAnimatedItem,&#xA;               ISupportXtraAnimation,&#xA;               ISupportAdornerElementEx,&#xA;               ISupportAdornerElement,&#xA;               IUpdateAdornerUI,&#xA;               ISupportDXSkinColorsEx,&#xA;               ISupportDXSkinColors</code></pre>
                        </section>

## Related API Members

The following members return **XtraTabPage** objects:

- [TabPageChangedEventArgs.Page](/WindowsForms/DevExpress.XtraTab.TabPageChangedEventArgs.Page)
- [TabPageChangedEventArgs.PrevPage](/WindowsForms/DevExpress.XtraTab.TabPageChangedEventArgs.PrevPage)
- [TabPageEventArgs.Page](/WindowsForms/DevExpress.XtraTab.TabPageEventArgs.Page)
- [XtraTabControl.HotTrackedTabPage](/WindowsForms/DevExpress.XtraTab.XtraTabControl.HotTrackedTabPage)
- [XtraTabControl.SelectedTabPage](/WindowsForms/DevExpress.XtraTab.XtraTabControl.SelectedTabPage)
- [XtraTabPageCollection.Add()](/WindowsForms/DevExpress.XtraTab.XtraTabPageCollection.Add)
- [XtraTabPageCollection.Add(String)](/WindowsForms/DevExpress.XtraTab.XtraTabPageCollection.Add%28System.String%29)
- [XtraTabPageCollection.Item\[Int32\]](/WindowsForms/DevExpress.XtraTab.XtraTabPageCollection.Item%28System.Int32%29)

## Remarks

Tab pages display UI controls. A tab page has a header that can display an image and text.

![WinForms Tab Control, DevExpress](/WindowsForms/images/xtratabpage4180.png)

The [XtraTabControl](/WindowsForms/DevExpress.XtraTab.XtraTabControl) stores tab pages in the [XtraTabControl.TabPages](/WindowsForms/DevExpress.XtraTab.XtraTabControl.TabPages) collection. Use index notation to access specific tab pages.

### Text and Image

| Property Name | Description |
| --- | --- |
| [Text](/WindowsForms/DevExpress.XtraTab.XtraTabPage.Text) | Specifies the tab header text. |
| [ImageOptions](/WindowsForms/DevExpress.XtraTab.XtraTabPage.ImageOptions) | Contains image-related settings. |
| [StartAnimation()](/WindowsForms/DevExpress.XtraTab.XtraTabPage.StartAnimation) | Starts the GIF animation. |
| [StopAnimation()](/WindowsForms/DevExpress.XtraTab.XtraTabPage.StopAnimation) | Stops the GIF animation. |

![Display a GIF Animation in the Tab Page Header - WinForms XtraTabControl, DevExpress](/WindowsForms/images/xtratabpage_animate9862.gif)

### Display Settings

| Setting | Property Name |
| --- | --- |
| Visibility | [PageVisible](/WindowsForms/DevExpress.XtraTab.XtraTabPage.PageVisible) |
| Availability | [PageEnabled](/WindowsForms/DevExpress.XtraTab.XtraTabPage.PageEnabled) |
| Appearance | [Appearance](/WindowsForms/DevExpress.XtraTab.XtraTabPage.Appearance) / [XtraTabControl.AppearancePage](/WindowsForms/DevExpress.XtraTab.XtraTabControl.AppearancePage) (general settings) |

## Example

The following code snippet creates a `PersonViewModel` class, a `BindingSource` with generic data, and an `XtraTabControl` with two tab pages. Each page contains DevExpress WinForms data editors bound to the corresponding properties of the shared data source.

- C#
- VB.NET

<section id="tabpanel_spwzW8rGdT_tabid-csharp" role="tabpanel" data-tab="tabid-csharp">
<pre><code data-code-links="{&quot;/ (System.ComponentModel)(?:;|$)/&quot;:&quot;https://learn.microsoft.com/dotnet/api/system.componentmodel&quot;,&quot;/ (System.Windows.Forms)(?:;|$)/&quot;:&quot;https://learn.microsoft.com/dotnet/api/system.windows.forms&quot;,&quot;/ (DevExpress.XtraEditors)(?:;|$)/&quot;:&quot;/WindowsForms/DevExpress.XtraEditors&quot;,&quot;/ (DevExpress.XtraTab)(?:;|$)/&quot;:&quot;/WindowsForms/DevExpress.XtraTab&quot;}" class="lang-csharp">using System.ComponentModel;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraTab;

namespace DXTabControlDemo {
    public partial class Form1 : XtraForm {
        public Form1() {
            InitializeComponent();
            // Create and configure BindingSource.
            BindingSource bindingSource = new BindingSource();
            bindingSource.DataSource = new PersonViewModel { Id = 1, Name = &quot;John Doe&quot;, Email = &quot;john@example.com&quot; };

            // Create XtraTabControl.
            XtraTabControl tabControl = new XtraTabControl { Dock = DockStyle.Fill };

            // Create the first tab page.
            XtraTabPage tabPage1 = new XtraTabPage { Text = &quot;General&quot; };
            TextEdit textEditId = new TextEdit { Dock = DockStyle.Top };
            TextEdit textEditName = new TextEdit { Dock = DockStyle.Top };
            textEditId.DataBindings.Add(&quot;EditValue&quot;, bindingSource, nameof(PersonViewModel.Id));
            textEditName.DataBindings.Add(&quot;EditValue&quot;, bindingSource, nameof(PersonViewModel.Name));
            tabPage1.Controls.Add(textEditName);
            tabPage1.Controls.Add(textEditId);

            // Create the second tab page.
            XtraTabPage tabPage2 = new XtraTabPage { Text = &quot;Contact&quot; };
            TextEdit textEditEmail = new TextEdit { Dock = DockStyle.Top };
            textEditEmail.DataBindings.Add(&quot;EditValue&quot;, bindingSource, nameof(PersonViewModel.Email));
            tabPage2.Controls.Add(textEditEmail);

            // Add tab pages to the Tab control
            tabControl.TabPages.Add(tabPage1);
            tabControl.TabPages.Add(tabPage2);

            // Add the Tab control to the Form.
            Controls.Add(tabControl);
        }
    }
    // ViewModel
    public class PersonViewModel : INotifyPropertyChanged {
        int id;
        string name;
        string email;

        public int Id {
            get =&gt; id;
            set { id = value; OnPropertyChanged(nameof(Id)); }
        }

        public string Name {
            get =&gt; name;
            set { name = value; OnPropertyChanged(nameof(Name)); }
        }

        public string Email {
            get =&gt; email;
            set { email = value; OnPropertyChanged(nameof(Email)); }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        void OnPropertyChanged(string propertyName) =&gt;
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
    }
}
</code></pre></section>
<section id="tabpanel_spwzW8rGdT_tabid-vb" role="tabpanel" data-tab="tabid-vb" aria-hidden="true" hidden="hidden">
<pre><code data-code-links="{&quot;/ (System.ComponentModel)(?:;|$)/&quot;:&quot;https://learn.microsoft.com/dotnet/api/system.componentmodel&quot;,&quot;/ (System.Windows.Forms)(?:;|$)/&quot;:&quot;https://learn.microsoft.com/dotnet/api/system.windows.forms&quot;,&quot;/ (DevExpress.XtraEditors)(?:;|$)/&quot;:&quot;/WindowsForms/DevExpress.XtraEditors&quot;,&quot;/ (DevExpress.XtraTab)(?:;|$)/&quot;:&quot;/WindowsForms/DevExpress.XtraTab&quot;}" class="lang-vb">Imports System.ComponentModel
Imports System.Windows.Forms
Imports DevExpress.XtraEditors
Imports DevExpress.XtraTab

Namespace DXTabControlDemo
    Partial Public Class Form1
        Inherits XtraForm

        Public Sub New()
            InitializeComponent()

            &#39; Create and configure BindingSource.
            Dim bindingSource As New BindingSource()
            bindingSource.DataSource = New PersonViewModel With {
                .Id = 1,
                .Name = &quot;John Doe&quot;,
                .Email = &quot;john@example.com&quot;
            }

            &#39; Create XtraTabControl.
            Dim tabControl As New XtraTabControl() With {
                .Dock = DockStyle.Fill
            }

            &#39; Create the first tab page.
            Dim tabPage1 As New XtraTabPage() With {
                .Text = &quot;General&quot;
            }
            Dim textEditId As New TextEdit() With {
                .Dock = DockStyle.Top
            }
            Dim textEditName As New TextEdit() With {
                .Dock = DockStyle.Top
            }
            textEditId.DataBindings.Add(&quot;EditValue&quot;, bindingSource, NameOf(PersonViewModel.Id))
            textEditName.DataBindings.Add(&quot;EditValue&quot;, bindingSource, NameOf(PersonViewModel.Name))
            tabPage1.Controls.Add(textEditName)
            tabPage1.Controls.Add(textEditId)

            &#39; Create the second tab page.
            Dim tabPage2 As New XtraTabPage() With {
                .Text = &quot;Contact&quot;
            }
            Dim textEditEmail As New TextEdit() With {
                .Dock = DockStyle.Top
            }
            textEditEmail.DataBindings.Add(&quot;EditValue&quot;, bindingSource, NameOf(PersonViewModel.Email))
            tabPage2.Controls.Add(textEditEmail)

            &#39; Add tab pages to the Tab control
            tabControl.TabPages.Add(tabPage1)
            tabControl.TabPages.Add(tabPage2)

            &#39; Add the Tab control to the Form.
            Controls.Add(tabControl)
        End Sub
    End Class

    &#39; ViewModel
    Public Class PersonViewModel
        Implements INotifyPropertyChanged

        Private _id As Integer
        Private _name As String
        Private _email As String

        Public Property Id As Integer
            Get
                Return _id
            End Get
            Set(value As Integer)
                _id = value
                OnPropertyChanged(NameOf(Id))
            End Set
        End Property

        Public Property Name As String
            Get
                Return _name
            End Get
            Set(value As String)
                _name = value
                OnPropertyChanged(NameOf(Name))
            End Set
        End Property

        Public Property Email As String
            Get
                Return _email
            End Get
            Set(value As String)
                _email = value
                OnPropertyChanged(NameOf(Email))
            End Set
        End Property

        Public Event PropertyChanged As PropertyChangedEventHandler _
            Implements INotifyPropertyChanged.PropertyChanged

        Private Sub OnPropertyChanged(propertyName As String)
            RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
        End Sub
    End Class
End Namespace
</code></pre></section>

## Implements

[IXtraResizableControl](/WindowsForms/DevExpress.Utils.Controls.IXtraResizableControl)

## Inheritance

[Object](https://learn.microsoft.com/dotnet/api/system.object)
[MarshalByRefObject](https://learn.microsoft.com/dotnet/api/system.marshalbyrefobject)
[Component](https://learn.microsoft.com/dotnet/api/system.componentmodel.component)
[Control](https://learn.microsoft.com/dotnet/api/system.windows.forms.control)
[ScrollableControl](https://learn.microsoft.com/dotnet/api/system.windows.forms.scrollablecontrol)
[XtraScrollableControl](/WindowsForms/DevExpress.XtraEditors.XtraScrollableControl)
[XtraPanel](/WindowsForms/DevExpress.XtraEditors.XtraPanel)
XtraTabPage

See Also

[XtraTabPage Members](/WindowsForms/DevExpress.XtraTab.XtraTabPage._members)

[DevExpress.XtraTab Namespace](/WindowsForms/DevExpress.XtraTab)