# Getting Started with WPF TabbedWindow

This tutorial will walk you through the creation of a sample application that contains a **RadTabbedWindow** control.

## Adding Telerik Assemblies Using NuGet

To use **RadTabbedWindow** when working with NuGet packages, install the `Telerik.Windows.Controls.Navigation.for.Wpf.Xaml` package. The [package name may vary](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/nuget/available-packages) slightly based on the Telerik dlls set - [Xaml or NoXaml](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/xaml-vs-noxaml)

Read more about NuGet installation in the [Installing UI for WPF from NuGet Package](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/nuget/nuget-installation) article.

> tip With the 2025 Q1 release, Telerik UI for WPF has a new licensing mechanism. See [Installing a License Key](https://www.telerik.com/products/wpf/documentation/installation/licensing/installing-license-key) for setup instructions.

## Adding Assembly References Manually

If you are not using NuGet packages, you can add a reference to the following assemblies:

* **Telerik.Licensing.Runtime**
* **Telerik.Windows.Controls**
* **Telerik.Windows.Controls.Navigation**
* **Telerik.Windows.Controls.Data**

## Adding RadTabbedWindow to the Project

In Visual Studio, open the project's **Add New Item** dialog. Select **Window (WPF)**, name it **TabbedWindow**, and select **Add**.

> caption Add new WPF window

![Visual Studio Add New Item dialog for creating TabbedWindow with the Window (WPF) template.](https://www.telerik.com/products/wpf/documentation/assets/b1c1b56f4566a0ae3110d293daa22f51/add-new-window.png)

After this, replace the generated Window declaration with the following XAML code:

**Example 1: Defining a RadTabbedWindow in XAML**

```XAML
<telerik:RadTabbedWindow x:Class="GettingStarted.TabbedWindow"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
</telerik:RadTabbedWindow>
```

> important Please note that you need to replace the **GettingStarted** namespace with your namespace.

Also in the code-behind file you should inherit the **RadTabbedWindow** instead of the standard MS **Window**.

**Example 2: Inherit from RadTabbedWindow**

```C#
public partial class TabbedWindow : RadTabbedWindow
{
    public TabbedWindow()
    {
        InitializeComponent();
    }
}
```

```VB.NET
	Partial Public Class TabbedWindow
		Inherits RadTabbedWindow

		Public Sub New()
			InitializeComponent()
		End Sub
	End Class
```

Finally, you can remove the **StartupUri** property from the **App.xaml** file and replace the code-behind with the following:

**Example 3: Open RadTabbedWindow on application startup**

```C#
public partial class App : Application
{
    public App()
    {
        var tabbedWindow = new TabbedWindow();
        tabbedWindow.Header = "My Tabbed Window";
        tabbedWindow.Height = 400;
        tabbedWindow.Width = 600;
        tabbedWindow.Show();
    }
}
```

```VB.NET
	Partial Public Class App
		Inherits Application

		Public Sub New()
			Dim tabbedWindow = New TabbedWindow()
			tabbedWindow.Header = "My Tabbed Window"
			tabbedWindow.Height = 400
			tabbedWindow.Width = 600
			tabbedWindow.Show()
		End Sub
	End Class
```

Run the application to display an empty RadTabbedWindow with no tabs, as shown below.

> caption Empty RadTabbedWindow

![RadTabbedWindow before any tab items are added.](https://www.telerik.com/products/wpf/documentation/assets/ca5b706fbb8b5fa3afbc13303d51bb5d/tabbedwindow-getting-started-1.png)

> important If you're using the [implicit styles](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/styling-apperance-setting-a-theme-overview) theming mechanism with the [NoXaml binaries](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/xaml-vs-noxaml), note that the newly created window will not automatically receive the default style. In order for this to happen, you should add the following style after the merged dictionaries:

**Example 4: Adding the style for the new TabbedWindow**

```XAML
<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="Themes/System.Windows.xaml" />
            <ResourceDictionary Source="Themes/Telerik.Windows.Controls.xaml" />
            <ResourceDictionary Source="Themes/Telerik.Windows.Controls.Navigation.xaml" />
        </ResourceDictionary.MergedDictionaries>
        <Style TargetType="local:TabbedWindow" BasedOn="{StaticResource RadTabbedWindowStyle}" />
    </ResourceDictionary>
</Application.Resources>
```

## Add Tabs

You can add tabs to the window by directly defining them as its content.

**Example 5: Adding Tabs to RadTabbedWindow in XAML**

```XAML
<telerik:RadTabbedWindow
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <telerik:RadTabItem Header="Microsoft">
        <TextBlock Text="Microsoft Content" />
    </telerik:RadTabItem>
    <telerik:RadTabItem Header="Google">
        <TextBlock Text="Google Content" />
    </telerik:RadTabItem>
    <telerik:RadTabItem Header="Progress">
        <TextBlock Text="Progress Content" />
    </telerik:RadTabItem>
</telerik:RadTabbedWindow>
```

Run the application to display the **Microsoft**, **Google**, and **Progress** tabs. The selected **Microsoft** tab displays **Microsoft Content**.

> caption RadTabbedWindow with tabs

![RadTabbedWindow with three tabs and the first tab selected.](https://www.telerik.com/products/wpf/documentation/assets/4a4877bfa1832b9918f380a4b0055dc2/tabbedwindow-getting-started-2.png)

Alternatively, you can set the **ItemsSource** property of the control or bind it to a collection in your viewmodel. You can find an example of how to do this in the [Data Binding](https://www.telerik.com/products/wpf/documentation/controls/radtabbedwindow/data-binding) article.

## Setting a Theme

The controls from our suite support different themes. See [Applying a Theme with Implicit Styles](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/styling-apperance-setting-a-theme-overview) for instructions.

> important Changing the theme using implicit styles will affect all controls that have styles defined in the merged resource dictionaries. This is applicable only for the controls in the scope in which the resources are merged.

To change the theme, you can follow the steps below:

* Choose between the themes and add reference to the corresponding theme assembly (ex: **Telerik.Windows.Themes.Windows8.dll**). You can see the different themes applied in the **Theming** examples from our [WPF Controls Examples](https://demos.telerik.com/wpf/) application.

* Merge the resource dictionaries with the namespace required for the controls that you are using from the theme assembly. For **RadTabbedWindow**, you will need to merge the following resource dictionaries:

  * **System.Windows.xaml**
  * **Telerik.Windows.Controls.xaml**
  * **Telerik.Windows.Controls.Navigation.xaml**

**Example 6** demonstrates how to merge the resource dictionaries so that they are applied globally for the entire application.

**Example 6: Merge the ResourceDictionaries**

```XAML
<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/System.Windows.xaml"/>
            <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.xaml"/>
            <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/>
        </ResourceDictionary.MergedDictionaries>
        <Style TargetType="local:TabbedWindow" BasedOn="{StaticResource RadTabbedWindowStyle}" />
    </ResourceDictionary>
</Application.Resources>
```

The following screenshot shows the tabbed window after applying the **Windows8** theme. The selected tab still displays **Microsoft Content**.

> caption RadTabbedWindow with the Windows8 theme

![RadTabbedWindow styled with the Windows8 theme.](https://www.telerik.com/products/wpf/documentation/assets/733130b5aeb1ce9f5178014fd578e15b/tabbedwindow-getting-started-3.png)

## Telerik UI for WPF Learning Resources

* [Telerik UI for WPF TabbedWindow Component](https://www.telerik.com/products/wpf/tabbedwindow.aspx)
* [Getting Started with Telerik UI for WPF Components](https://www.telerik.com/products/wpf/documentation/getting-started/first-steps-nuget)
* [Telerik UI for WPF Installation](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/installation-guide)
* [Telerik UI for WPF and WinForms Integration](https://www.telerik.com/products/wpf/documentation/common-information/winforms-integration/overview)
* [Telerik UI for WPF Visual Studio Templates](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/visual-studio-templates)
* [Applying a Theme with Implicit Styles](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/styling-apperance-setting-a-theme-overview)
* [Telerik UI for WPF Virtual Classroom (Training Courses for Registered Users)](https://learn.telerik.com/learn/course/external/view/elearning/16/telerik-ui-for-wpf)
* [Telerik UI for WPF License Agreement](https://www.telerik.com/purchase/license-agreement/wpf-dlw-s)

## See Also

* [Key Properties](https://www.telerik.com/products/wpf/documentation/controls/radtabbedwindow/key-properties)
* [Events](https://www.telerik.com/products/wpf/documentation/controls/radtabbedwindow/events)
* [Styles and Templates](https://www.telerik.com/products/wpf/documentation/controls/radtabbedwindow/styles-and-templates)
