---
title: "Tab control in WPF"  
description: "We can use tab control to organize window more efficiently and easily. Two elements play an important role while creating a tab control in WPF. One is"  
author: "Anonymous User"  
published: 2011-04-08  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/542/tab-control-in-wpf  
category: "wpf"  
tags: ["wpf"]  
reading_time: 1 minute  

---

# Tab control in WPF

We can use tab control to organize window more efficiently and easily. Two elements play an important role while creating a tab control in WPF. One is TabControl and another one is TabItem. In XAML <TabControl /> element is used to create a TabControl while <TabItem /> element is used to create <TabElement /> control. In this demonstration I will show you how to use tab control in WPF\

##### XAML code snippet to create a Tab control

```
<Grid>        <TabControl>            <TabItem Header="Name">                <Label x:Name="lblName" Content="Hello Awadhendra" />            </TabItem>            <TabItem Header="Image" >                <Image Source="C:\Users\Public\Pictures\Sample Pictures\Hydrangeas.jpg" />            </TabItem>            <TabItem Header="Contact Us" >                <Canvas>                    <Label x:Name="lblUserName" Content="User Name" Canvas.Left="30" Canvas.Top="30" />                    <TextBox x:Name="txtUserName" Width="200" Height="30" Canvas.Right="90" Canvas.Top="30" />                    <Label x:Name="lblUserEmaiId" Content="Email Id" Canvas.Left="30" Canvas.Top="70" />                    <TextBox x:Name="txtUserEmailID" Width="200" Height="30" Canvas.Right="90" Canvas.Top="70" />                    <Label x:Name="lblUserContactNumber" Content="Contact Number" Canvas.Left="30" Canvas.Top="110" />                    <TextBox x:Name="txtUserContactNumber" Width="200" Canvas.Right="90" Height="30" Canvas.Top="110" />                    <Button x:Name="btnSubmit" Content="Submit Information" Canvas.Left="155" Canvas.Top="150" />                </Canvas>            </TabItem>        </TabControl></Grid>
```

##### Output of the following code snippet is as follows

![Tab control in WPF](https://www.mindstick.com/mindstickarticle/de00186c-3fc5-4c5c-9579-53ddc5051379/images/8fc83b37-b232-4b40-b145-78686b9efa7b.png)

![Tab control in WPF](https://www.mindstick.com/mindstickarticle/de00186c-3fc5-4c5c-9579-53ddc5051379/images/ffda100f-0333-4b40-a36d-460398e99057.png)

![Tab control in WPF](https://www.mindstick.com/mindstickarticle/de00186c-3fc5-4c5c-9579-53ddc5051379/images/d55d2f1d-631a-415a-9fac-1a9727aac1d7.png)

---

Original Source: https://www.mindstick.com/articles/542/tab-control-in-wpf

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
