Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
Silverlight
TabControl Class
 TabStripPlacement Property
Collapse All/Expand All Collapse All
.NET Framework Class Library for Silverlight
TabControl..::.TabStripPlacement Property

Gets or sets how TabItem headers align relative to the TabItem content.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls (in System.Windows.Controls.dll)
Visual Basic (Declaration)
Public Property TabStripPlacement As Dock
C#
public Dock TabStripPlacement { get; set; }
XAML Attribute Usage
<sdk:TabControl TabStripPlacement="dockValue"/>

XAML Values

dockValue

A named constant of the Dock enumeration, such as Left.

Property Value

Type: System.Windows.Controls..::.Dock
The alignment of TabItem headers relative to the TabItem content. The default is Top.

Dependency property identifier field: TabStripPlacementProperty

The following code sets the tab strip to display along the bottom of the TabControl. This code is part of a larger example available in the TabControl class overview.

Visual Basic
'Here we add TabItems to two TabControls, 
'tab1 and tab2.
Dim ti As New TabItem()
ti.Header = "First TabItem!"
ti.Content = "This is the first TabItem's content."
tab1.Items.Add(ti)

ti = New TabItem()
ti.Header = "Second TabItem!"
ti.Content = "This is the second TabItem's content."
tab1.Items.Add(ti)

ti = New TabItem()
ti.Header = "Third TabItem!"
ti.Content = "This is the third TabItem's content."
tab1.Items.Add(ti)

ti = New TabItem()
ti.Header = "First TabItem!"
ti.Content = "This is the first TabItem of the second TabControl."
tab2.Items.Add(ti)

ti = New TabItem()
ti.Header = "Second TabItem!"
ti.Content = "This is the second TabItem of the second TabControl."
tab2.Items.Add(ti)

ti = New TabItem()
ti.Header = "Third TabItem!"
ti.Content = "This is the third TabItem of the second TabControl."
tab2.Items.Add(ti)

'Set tab2's tab strip to run along the bottom of the 
'TabControl, rather than the top. 
tab2.TabStripPlacement = Dock.Bottom
C#
//Here we add TabItems to two TabControls,
//tab1 and tab2.
TabItem ti = new TabItem();
ti.Header = "First TabItem!";
ti.Content = "This is the first TabItem's content.";
tab1.Items.Add(ti);

ti = new TabItem();
ti.Header = "Second TabItem!";
ti.Content = "This is the second TabItem's content.";
tab1.Items.Add(ti);

ti = new TabItem();
ti.Header = "Third TabItem!";
ti.Content = "This is the third TabItem's content.";
tab1.Items.Add(ti);

ti = new TabItem();
ti.Header = "First TabItem!";
ti.Content = "This is the first TabItem of the second TabControl.";
tab2.Items.Add(ti);

ti = new TabItem();
ti.Header = "Second TabItem!";
ti.Content = "This is the second TabItem of the second TabControl.";
tab2.Items.Add(ti);

ti = new TabItem();
ti.Header = "Third TabItem!";
ti.Content = "This is the third TabItem of the second TabControl.";
tab2.Items.Add(ti);

//Set tab2's tab strip to run along the bottom of the
//TabControl, rather than the top.
tab2.TabStripPlacement = Dock.Bottom;

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker