New to Telerik UI for WPFStart a free 30-day trial

A navigation control used to create tabbed interface.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Navigation.dll

Syntax:

C#
[TelerikToolboxCategory("Navigation")]
[Themable]
public class RadTabControl : RadTabControlBase

Inheritance: objectRadTabControlBaseRadTabControl

Derived Classes: PaneGroupBaseFileBrowserTabControlRadOutlookBarRadRibbonBackstageTabbedWindowTabControl

Inherited Members RadTabControlBase.PreviewSelectionChangedEventRadTabControlBase.SelectionChangedEventRadTabControlBase.DropDownOpenedEventRadTabControlBase.DropDownClosedEventRadTabControlBase.HeaderBackgroundPropertyRadTabControlBase.ReorderTabRowsPropertyRadTabControlBase.SelectedContentPropertyRadTabControlBase.SelectedContentTemplatePropertyRadTabControlBase.SelectedContentTemplateSelectorPropertyRadTabControlBase.ContentTemplatePropertyRadTabControlBase.ContentTemplateSelectorPropertyRadTabControlBase.IsContentPreservedPropertyRadTabControlBase.PropagateItemDataContextToContentPropertyRadTabControlBase.SelectedItemRemoveBehaviourPropertyRadTabControlBase.BackgroundVisibilityPropertyRadTabControlBase.Selector_SelectionChanged(object, SelectionChangedEventArgs)RadTabControlBase.UpdateTabRows()RadTabControlBase.GoToState(bool, params string[])RadTabControlBase.OnPreviewSelectionChanged(SelectionChangedEventArgs)RadTabControlBase.GetContainerForItemOverride()RadTabControlBase.IsItemItsOwnContainerOverride(object)RadTabControlBase.IsSelectionNonBoundAtClientSide()RadTabControlBase.ClearContentSafely()RadTabControlBase.AddDropDownOpenedHandler(UIElement, DropDownEventHandler)RadTabControlBase.RemoveDropDownOpenedHandler(UIElement, DropDownEventHandler)RadTabControlBase.AddDropDownClosedHandler(UIElement, DropDownEventHandler)RadTabControlBase.RemoveDropDownClosedHandler(UIElement, DropDownEventHandler)RadTabControlBase.UpdateFocusOnSelectionChange()RadTabControlBase.HeaderBackgroundRadTabControlBase.ReorderTabRowsRadTabControlBase.SelectedContentRadTabControlBase.SelectedContentTemplateRadTabControlBase.SelectedContentTemplateSelectorRadTabControlBase.ContentTemplateRadTabControlBase.ContentTemplateSelectorRadTabControlBase.IsContentPreservedRadTabControlBase.PropagateItemDataContextToContentRadTabControlBase.SelectedItemRemoveBehaviourRadTabControlBase.SupressSelectedContentTemplateReapplyingRadTabControlBase.IsDefaultItemSelectedRadTabControlBase.TabStripRadTabControlBase.ContentElementRadTabControlBase.ContentElementsPanelRadTabControlBase.TabFlagsRadTabControlBase.this[int]RadTabControlBase.BackgroundVisibilityRadTabControlBase.PreviewSelectionChangedRadTabControlBase.SelectionChangedRadTabControlBase.DropDownOpenedRadTabControlBase.DropDownClosed...

Constructors

Initializes a new instance of the RadTabControl class.

C#
public RadTabControl()
csharp
<telerik:RadTabControl>
    <telerik:RadTabItem Header="Tab 1"/>
</telerik:RadTabControl>
csharp
RadTabControl tabControl = new RadTabControl();
tabControl.Items.Add(new RadTabItem(){Header="Tab 1", Content="Tab Content"});

Fields

AdditionalContentProperty

DependencyProperty

Identifies the AdditionalContent property.

C#
public static readonly DependencyProperty AdditionalContentProperty

AlignProperty

DependencyProperty

Identifies the Align property.

C#
public static readonly DependencyProperty AlignProperty

AllowDragOverTabProperty

DependencyProperty

Identifies the AllowDragOverTab property.

C#
public static readonly DependencyProperty AllowDragOverTabProperty

AllowDragReorderProperty

DependencyProperty

Identifies the AllowDragReorder property.

C#
public static readonly DependencyProperty AllowDragReorderProperty

AllTabsEqualHeightProperty

DependencyProperty

Identifies the AllTabsEqualHeight property.

C#
public static readonly DependencyProperty AllTabsEqualHeightProperty

BottomTemplateProperty

DependencyProperty

Identifies the BottomTemplate property.

C#
public static readonly DependencyProperty BottomTemplateProperty

Identifies the CloseTabsOnMouseMiddleButtonDown property.

C#
public static readonly DependencyProperty CloseTabsOnMouseMiddleButtonDownProperty

DropDownButtonStyleProperty

DependencyProperty

Identifies the DropDownButtonStyle property.

C#
public static readonly DependencyProperty DropDownButtonStyleProperty

Identifies the DropDownDisplayMemberPath property.

C#
public static readonly DependencyProperty DropDownDisplayMemberPathProperty

DropDownDisplayModeProperty

DependencyProperty

Identifies the DropDownDisplayMode property.

C#
public static readonly DependencyProperty DropDownDisplayModeProperty

DropDownStyleProperty

DependencyProperty

Identifies the DropDownStyle property.

C#
public static readonly DependencyProperty DropDownStyleProperty

Identifies the InvertMouseWheelScrollDirection property.

C#
public static readonly DependencyProperty InvertMouseWheelScrollDirectionProperty

IsDropDownOpenProperty

DependencyProperty

Identifies the IsDropDownOpen property.

C#
public static readonly DependencyProperty IsDropDownOpenProperty

Identifies the ItemDropDownContentTemplate property.

C#
public static readonly DependencyProperty ItemDropDownContentTemplateProperty

Identifies the ItemDropDownContentTemplateSelector property.

C#
public static readonly DependencyProperty ItemDropDownContentTemplateSelectorProperty

Identifies the ItemReordered routed event.

C#
public static readonly RoutedEvent ItemReorderedEvent

LeftTemplateProperty

DependencyProperty

Identifies the LeftTemplate property.

C#
public static readonly DependencyProperty LeftTemplateProperty

OverflowModeProperty

DependencyProperty

Identifies the OverflowModeProperty property.

C#
public static readonly DependencyProperty OverflowModeProperty

Registers the PreviewTabClosed routed event.

C#
public static readonly RoutedEvent PreviewTabClosedEvent

Registers the PreviewTabPinned routed event.

C#
public static readonly RoutedEvent PreviewTabPinnedEvent

Registers the PreviewTabUnpinned routed event.

C#
public static readonly RoutedEvent PreviewTabUnpinnedEvent

RightTemplateProperty

DependencyProperty

Identifies the RightTemplate property.

C#
public static readonly DependencyProperty RightTemplateProperty

ScrollModeProperty

DependencyProperty

Identifies the ScrollModeProperty property.

C#
public static readonly DependencyProperty ScrollModeProperty

TabClosedEvent

RoutedEvent

Registers the TabClosed routed event.

C#
public static readonly RoutedEvent TabClosedEvent

TabOrientationProperty

DependencyProperty

Identifies the TabOrientation property.

C#
public static readonly DependencyProperty TabOrientationProperty

TabPinnedEvent

RoutedEvent

Registers the TabPinned routed event.

C#
public static readonly RoutedEvent TabPinnedEvent

TabStripPlacementProperty

DependencyProperty

Identifies the TabStripPlacement property.

C#
public static readonly DependencyProperty TabStripPlacementProperty

TabUnpinnedEvent

RoutedEvent

Registers the TabUnpinned routed event.

C#
public static readonly RoutedEvent TabUnpinnedEvent

TopTemplateProperty

DependencyProperty

Identifies the TopTemplate property.

C#
public static readonly DependencyProperty TopTemplateProperty

Properties

Identifies the AdditionalContent property.

C#
public object AdditionalContent { get; set; }

Gets or sets the alignment of the tab items in the row - Left, Right, Center, Justify. This is a dependency property.

C#
[SRDescription("TabControlAlignDescription")]
[SRCategory("AppearanceCategory")]
public TabStripAlign Align { get; set; }
Remarks:

The Align property arranges the tab items in the preferred way - Left, Right, Center or Justify.

If Align Justify is selected, the items would be scaled proportionally all the to fill the available space.

If not enough space is available (i.e. the desired width of the row of tab items is more than the available space), then the tab items are arranged as if "Justify" is chosen. Unlike the WPF tab control behaviour the tab items would not automatically move to the next row if there is not enough space, instead their width is reduced and parts of them can be clipped.

If you would like to create a multi row tab control, please use the IsBreak property of the tab item.

The default value is Left.

Gets or sets a value indicating whether dragging objects over a tab item will select this TabItem. This is a dependency property.

C#
[SRCategory("Behavior")]
public bool AllowDragOverTab { get; set; }
Remarks:

The DragOverTab feature will work only if the RadDragAndDropManager is used.

The default value is false.

Gets or sets a value indicating whether the user will be able to rearrange the tabs with dragging. This is a dependency property.

C#
[SRCategory("Behavior")]
public bool AllowDragReorder { get; set; }
Remarks:

The default value is false.

Gets or sets whether all displayed tabs have equal height. This is a dependency property.

C#
[SRCategory("AppearanceCategory")]
[SRDescription("TabControlAllTabsEqualHeightDescription")]
public bool AllTabsEqualHeight { get; set; }
Remarks:

The AllTabsEqualHeight property governs the arranging behaviour of the TabStrip when TabItems with different height are present.

If you have multiline TabItems for example, setting the property to True would ensure that all the TabItems have the same height.

Please note that the adjustment of height takes place on a row-per-row basis, i.e. in a two-row TabStrip the height of the TabItems would be equal to the height of the highest item in each row and might be different.

The default value is true.

BottomTemplate

ControlTemplate

Gets or sets the template of the tab control when the TabStripPlacement is set to Bottom. This is a dependency property.

C#
[SRCategory("Appearance")]
[SRDescription("TabControlBottomTemplateDescription")]
public ControlTemplate BottomTemplate { get; set; }
Remarks:

For more information, please see TopTemplate property.

Gets or sets a value indicating whether user can close tabs by clicking the mouse middle button over a particular RadTabItem.

C#
public bool CloseTabsOnMouseMiddleButtonDown { get; set; }

Gets or sets the style for the toggle button in the ControlTemplate of the tab control. This is a dependency property.

C#
[SRCategory("AppearanceCategory")]
public Style DropDownButtonStyle { get; set; }

Gets or sets the name of property that will be used to display tab items in the . This is a dependency property.

C#
public string DropDownDisplayMemberPath { get; set; }

Gets or sets when the button should be displayed: always, never, when needed. This is a dependency property.

C#
public TabControlDropDownDisplayMode DropDownDisplayMode { get; set; }

Gets or sets the style for the of the tab control. This is a dependency property.

C#
[SRCategory("AppearanceCategory")]
public Style DropDownStyle { get; set; }

Inverts the scrolling direction when using the mouse wheel over the tab strip panel.

C#
public bool InvertMouseWheelScrollDirection { get; set; }

Gets or sets a value indicating whether the of the tab control is open. This is a dependency property.

C#
[SRCategory("AppearanceCategory")]
public bool IsDropDownOpen { get; set; }

Gets or sets the DataTemplate that will be used to display the items in the drop down menu if they do not have a ItemDropDownContentTemplateSelector. This is a dependency property.

C#
[SRCategory("AppearanceCategory")]
public DataTemplate ItemDropDownContentTemplate { get; set; }

Gets or sets the DataTemplateSelector that will be used to display the items in the drop down menu if they do not have a ItemDropDownContentTemplate. This is a dependency property.

C#
[SRCategory("AppearanceCategory")]
public DataTemplateSelector ItemDropDownContentTemplateSelector { get; set; }

LeftTemplate

ControlTemplate

Gets or sets the template of the tab control when the TabStripPlacement is set to Left. This is a dependency property.

C#
[SRCategory("Appearance")]
[SRDescription("TabControlLeftTemplateDescription")]
public ControlTemplate LeftTemplate { get; set; }
Remarks:

For more information, please see TopTemplate property.

Gets or sets what happens when the width of the tab items exceeds the available width. They will either scroll or wrap.

C#
public TabOverflowMode OverflowMode { get; set; }

Gets the collection of currently pinned RadTabItems.

C#
public ReadOnlyObservableCollection<RadTabItem> PinnedItems { get; }

RightTemplate

ControlTemplate

Gets or sets the template of the tab control when the TabStripPlacement is set to Right. This is a dependency property.

C#
[SRCategory("Appearance")]
[SRDescription("TabControlRightTemplateDescription")]
public ControlTemplate RightTemplate { get; set; }
Remarks:

For more information, please see TopTemplate property.

Gets or sets the type of scrolling that will occur when the user presses the scroll buttons. This is a dependency property.

C#
public TabControlScrollMode ScrollMode { get; set; }

TabOrientation

Orientation

Gets or sets the orientation of the TabItems in the TabControl. This is a dependency property.

C#
[SRCategory("AppearanceCategory")]
[SRDescription("TabControlTabOrientationDescription")]
public Orientation TabOrientation { get; set; }
Remarks:

The TabOrientation property allows you to set the orientation of the tab items.

The default value is Horizontal.

The following examples show how TabOrientation can be set:

Please note that you need the telerik namespace to be defined in your XAML.

Gets or sets the position of the tab strip with regard to the content. This is a dependency property.

C#
[SRCategory("AppearanceCategory")]
[SRDescription("TabControlTabStripPlacementDescription")]
public Dock TabStripPlacement { get; set; }
Remarks:

The TabStripPlacement property allows you to change where the tab strip (i.e. the buttons) would appear relative to the content.

Please note that changing the TabStripPlacement changes the ControlTemplate of the tab items. To achieve a consistent look when a custom theme is created, ControlTemplates for the four positions should be provided.

The default value is Top.

TopTemplate

ControlTemplate

Gets or sets the template of the tab control when the TabStripPlacement is set to Top. This is a dependency property.

C#
[SRCategory("Appearance")]
[SRDescription("TabControlTopTemplateDescription")]
public ControlTemplate TopTemplate { get; set; }
Remarks:

There are four properties that set the templates of the TabControl: TopTemplate, BottomTemplate, LeftTemplate and RightTemplate. These templates will be used when the TabStripPlacement is changed. Please note that if these properties are set to null, the default templates will be used.

In order to set the templates for the tab items, the respective tab item properties should be used. If the tab items are generated ( is used) the ItemContainerStyle can be used to set the templates.

Methods

Updates the visual states of the control.

C#
protected override void ChangeVisualState(bool useTransitions)
Parameters:useTransitionsbool

Identifies whether the transitions should be used.

Overrides: RadTabControlBase.ChangeVisualState(bool)

When overridden in a derived class, undoes the effects of the method.

C#
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameters:elementDependencyObject

The container element.

itemobject

The item.

Returns a template for the given position of the tab strip.

C#
protected virtual ControlTemplate FindTemplateFromPosition(Dock position)
Parameters:positionDock

The position for which a template is requested.

Returns:

ControlTemplate

An instance of the template for the given position.

Returns a new instance of the control that implements the IRadTabItem interface.

C#
protected override IRadTabItem GetContainer()
Returns:

IRadTabItem

Overrides: RadTabControlBase.GetContainer()

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call .

C#
public override void OnApplyTemplate()

Creates a peer associated with this object.

C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

An instance of the .

Called when a menu item has been clicked.

C#
protected virtual void OnDropDownMenuItemClick(object sender, RoutedEventArgs e)
Parameters:senderobject

The sender of the event.

eRoutedEventArgs

The arguments of the event.

Raises the event. This method is invoked whenever is set to true internally.

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Called when the IsDropDownOpen property changes.

C#
protected virtual void OnIsDropDownOpenChanged(bool oldValue, bool newValue)
Parameters:oldValuebool

The old value of the property.

newValuebool

The new value of the property.

Invoked when the property changes.

C#
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters:eNotifyCollectionChangedEventArgs

Information about the change.

Invoked when the property changes.

C#
protected override void OnItemsPanelChanged(ItemsPanelTemplate oldItemsPanel, ItemsPanelTemplate newItemsPanel)
Parameters:oldItemsPanelItemsPanelTemplate

Old value of the property.

newItemsPanelItemsPanelTemplate

New value of the property.

Invoked when the left scroll button has been clicked.

C#
protected virtual void OnLeftScrollButtonClick(object sender, RoutedEventArgs e)
Parameters:senderobjecteRoutedEventArgs

Raises the event.

C#
protected virtual bool OnPreviewTabClosed(PreviewTabChangedEventArgs args)
Parameters:argsPreviewTabChangedEventArgs

The PreviewTabChangedEventArgs instance containing the event data.

Returns:

bool

Raises the event.

C#
protected virtual bool OnPreviewTabPinned(PreviewTabChangedEventArgs args)
Parameters:argsPreviewTabChangedEventArgs

The PreviewTabChangedEventArgs instance containing the event data.

Returns:

bool

Raises the event.

C#
protected virtual bool OnPreviewTabUnpinned(PreviewTabChangedEventArgs args)
Parameters:argsPreviewTabChangedEventArgs

The PreviewTabChangedEventArgs instance containing the event data.

Returns:

bool

Invoked when the right scroll button has been clicked.

C#
protected virtual void OnRightScrollButtonClick(object sender, RoutedEventArgs e)
Parameters:senderobjecteRoutedEventArgs

Invoked when scroll buttons visibility changes.

C#
protected virtual void OnScrollButtonsVisibilityChanged()

Raises the SelectionChanged routed event and selection automation events.

C#
protected override void OnSelectionChanged(RadSelectionChangedEventArgs e)
Parameters:eRadSelectionChangedEventArgs

Overrides: RadTabControlBase.OnSelectionChanged(RadSelectionChangedEventArgs)

Raises the event.

C#
protected virtual void OnTabClosed(TabChangedEventArgs args)
Parameters:argsTabChangedEventArgs

The TabChangedEventArgs instance containing the event data.

Raises the event.

C#
protected virtual void OnTabPinned(TabChangedEventArgs args)
Parameters:argsTabChangedEventArgs

The TabChangedEventArgs instance containing the event data.

Raises the event.

C#
protected virtual void OnTabUnpinned(TabChangedEventArgs args)
Parameters:argsTabChangedEventArgs

The TabChangedEventArgs instance containing the event data.

Prepares the specified element to display the specified item.

C#
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters:elementDependencyObject

Element used to display the specified item.

itemobject

Specified item.

Scrolls the container of given item into view.

C#
public void ScrollIntoView(object item)
Parameters:itemobject

The item to scroll into view.

Updates the selected content properties SelectedContent, SelectedContentTemplate and SelectedContentTemplateSelector. Selected content properties are used when representing the content of selected tab item.

C#
protected override void UpdateSelectedContentProperties()

Overrides: RadTabControlBase.UpdateSelectedContentProperties()

Updates the tab strip.

C#
protected void UpdateTabStrip()

Events

Occurs when a item is reordered while dragging. This is a RoutedEvent.

C#
public virtual event ItemReorderedEventHandler ItemReordered

Occurs when a RadTabItem is about to be closed.

C#
public event EventHandler<PreviewTabChangedEventArgs> PreviewTabClosed

Occurs when a RadTabItem is about to be pinned.

C#
public event EventHandler<PreviewTabChangedEventArgs> PreviewTabPinned

Occurs when a RadTabItem is about to be unpinned.

C#
public event EventHandler<PreviewTabChangedEventArgs> PreviewTabUnpinned

Occurs when a RadTabItem is closed.

C#
public event EventHandler<TabChangedEventArgs> TabClosed

Occurs when a RadTabItem is pinned.

C#
public event EventHandler<TabChangedEventArgs> TabPinned

Occurs when a RadTabItem is unpinned.

C#
public event EventHandler<TabChangedEventArgs> TabUnpinned
In this article
DefinitionConstructorsRadTabControl()FieldsAdditionalContentPropertyAlignPropertyAllowDragOverTabPropertyAllowDragReorderPropertyAllTabsEqualHeightPropertyBottomTemplatePropertyCloseTabsOnMouseMiddleButtonDownPropertyDropDownButtonStylePropertyDropDownDisplayMemberPathPropertyDropDownDisplayModePropertyDropDownStylePropertyInvertMouseWheelScrollDirectionPropertyIsDropDownOpenPropertyItemDropDownContentTemplatePropertyItemDropDownContentTemplateSelectorPropertyItemReorderedEventLeftTemplatePropertyOverflowModePropertyPreviewTabClosedEventPreviewTabPinnedEventPreviewTabUnpinnedEventRightTemplatePropertyScrollModePropertyTabClosedEventTabOrientationPropertyTabPinnedEventTabStripPlacementPropertyTabUnpinnedEventTopTemplatePropertyPropertiesAdditionalContentAlignAllowDragOverTabAllowDragReorderAllTabsEqualHeightBottomTemplateCloseTabsOnMouseMiddleButtonDownDropDownButtonStyleDropDownDisplayMemberPathDropDownDisplayModeDropDownStyleInvertMouseWheelScrollDirectionIsDropDownOpenItemDropDownContentTemplateItemDropDownContentTemplateSelectorLeftTemplateOverflowModePinnedItemsRightTemplateScrollModeTabOrientationTabStripPlacementTopTemplateMethodsChangeVisualState(bool)ClearContainerForItemOverride(DependencyObject, object)FindTemplateFromPosition(Dock)GetContainer()OnApplyTemplate()OnCreateAutomationPeer()OnDropDownMenuItemClick(object, RoutedEventArgs)OnInitialized(EventArgs)OnIsDropDownOpenChanged(bool, bool)OnItemsChanged(NotifyCollectionChangedEventArgs)OnItemsPanelChanged(ItemsPanelTemplate, ItemsPanelTemplate)OnLeftScrollButtonClick(object, RoutedEventArgs)OnPreviewTabClosed(PreviewTabChangedEventArgs)OnPreviewTabPinned(PreviewTabChangedEventArgs)OnPreviewTabUnpinned(PreviewTabChangedEventArgs)OnRightScrollButtonClick(object, RoutedEventArgs)OnScrollButtonsVisibilityChanged()OnSelectionChanged(RadSelectionChangedEventArgs)OnTabClosed(TabChangedEventArgs)OnTabPinned(TabChangedEventArgs)OnTabUnpinned(TabChangedEventArgs)PrepareContainerForItemOverride(DependencyObject, object)ScrollIntoView(object)UpdateSelectedContentProperties()UpdateTabStrip()EventsItemReorderedPreviewTabClosedPreviewTabPinnedPreviewTabUnpinnedTabClosedTabPinnedTabUnpinned
Not finding the help you need?
Contact Support