Skip to main content

How to: Create a DXTabControl in Code

The following example shows how to create a DXTabControl in code.

View Example

Imports Microsoft.VisualBasic
Imports System.Windows
Imports System.Windows.Controls
Imports DevExpress.Xpf.Core

Namespace DXTabControl_CreatingManually
    Partial Public Class MainWindow
        Inherits Window
        Public Sub New()
        End Sub
        Private Sub LayoutRoot_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
            Dim tabControl As New DXTabControl()
            tabControl.Height = 75
            tabControl.Width = 200

            Dim tabItem1 As New DXTabItem()
            tabItem1.Header = "Button"
            tabItem1.Content = New Button() With {.Content = "Button"}

            Dim tabItem2 As New DXTabItem()
            tabItem2.Header = "Check box"
            tabItem2.Content = New CheckBox() With {.Content = "Check box"}

        End Sub
    End Class
End Namespace