Class RadTabControl
A navigation control used to create tabbed interface.
Inherited Members
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.Navigation.dll
Syntax
[TelerikToolboxCategory("Navigation")]
[Themable]
public class RadTabControl : RadTabControlBase, IThemable
Remarks
The RadTabControl is used to create a list of tabs. It is
System.
Constructors
RadTabControl()
Initializes a new instance of the Rad
Declaration
public RadTabControl()
Remarks
Use this constructor to create an instance of the RadTabControl. In order for the TabControl to be displayed, you need to add it to the visual tree.
The Following examples show how you can create an instance of the RadTabControl control.
<telerik:RadTabControl>
<telerik:RadTabItem Header="Tab 1"/>
</telerik:RadTabControl>
RadTabControl tabControl = new RadTabControl();
tabControl.Items.Add(new RadTabItem(){Header="Tab 1", Content="Tab Content"});
Fields
AdditionalContentProperty
Identifies the Additional
Declaration
public static readonly DependencyProperty AdditionalContentProperty
Field Value
System.
|
AlignProperty
Identifies the Align property.
Declaration
public static readonly DependencyProperty AlignProperty
Field Value
System.
|
AllowDragOverTabProperty
Identifies the Allow
Declaration
public static readonly DependencyProperty AllowDragOverTabProperty
Field Value
System.
|
AllowDragReorderProperty
Identifies the Allow
Declaration
public static readonly DependencyProperty AllowDragReorderProperty
Field Value
System.
|
AllTabsEqualHeightProperty
Identifies the All
Declaration
public static readonly DependencyProperty AllTabsEqualHeightProperty
Field Value
System.
|
See Also
BottomTemplateProperty
Identifies the Bottom
Declaration
public static readonly DependencyProperty BottomTemplateProperty
Field Value
System.
|
CloseTabsOnMouseMiddleButtonDownProperty
Identifies the Close
Declaration
public static readonly DependencyProperty CloseTabsOnMouseMiddleButtonDownProperty
Field Value
System.
|
DropDownButtonStyleProperty
Identifies the Drop
Declaration
public static readonly DependencyProperty DropDownButtonStyleProperty
Field Value
System.
|
DropDownDisplayMemberPathProperty
Identifies the Drop
Declaration
public static readonly DependencyProperty DropDownDisplayMemberPathProperty
Field Value
System.
|
DropDownDisplayModeProperty
Identifies the Drop
Declaration
public static readonly DependencyProperty DropDownDisplayModeProperty
Field Value
System.
|
DropDownStyleProperty
Identifies the Drop
Declaration
public static readonly DependencyProperty DropDownStyleProperty
Field Value
System.
|
InvertMouseWheelScrollDirectionProperty
Identifies the Invert
Declaration
public static readonly DependencyProperty InvertMouseWheelScrollDirectionProperty
Field Value
System.
|
IsDropDownOpenProperty
Identifies the Is
Declaration
public static readonly DependencyProperty IsDropDownOpenProperty
Field Value
System.
|
ItemDropDownContentTemplateProperty
Identifies the Item
Declaration
public static readonly DependencyProperty ItemDropDownContentTemplateProperty
Field Value
System.
|
ItemDropDownContentTemplateSelectorProperty
Identifies the Item
Declaration
public static readonly DependencyProperty ItemDropDownContentTemplateSelectorProperty
Field Value
System.
|
ItemReorderedEvent
Identifies the Item
Declaration
public static readonly RoutedEvent ItemReorderedEvent
Field Value
System.
|
LeftTemplateProperty
Identifies the Left
Declaration
public static readonly DependencyProperty LeftTemplateProperty
Field Value
System.
|
OverflowModeProperty
Identifies the Overflow
Declaration
public static readonly DependencyProperty OverflowModeProperty
Field Value
System.
|
PreviewTabClosedEvent
Registers the Preview
Declaration
public static readonly RoutedEvent PreviewTabClosedEvent
Field Value
System.
|
PreviewTabPinnedEvent
Registers the Preview
Declaration
public static readonly RoutedEvent PreviewTabPinnedEvent
Field Value
System.
|
PreviewTabUnpinnedEvent
Registers the Preview
Declaration
public static readonly RoutedEvent PreviewTabUnpinnedEvent
Field Value
System.
|
RightTemplateProperty
Identifies the Right
Declaration
public static readonly DependencyProperty RightTemplateProperty
Field Value
System.
|
ScrollModeProperty
Identifies the Scroll
Declaration
public static readonly DependencyProperty ScrollModeProperty
Field Value
System.
|
TabClosedEvent
Registers the Tab
Declaration
public static readonly RoutedEvent TabClosedEvent
Field Value
System.
|
TabOrientationProperty
Identifies the Tab
Declaration
public static readonly DependencyProperty TabOrientationProperty
Field Value
System.
|
TabPinnedEvent
Registers the Tab
Declaration
public static readonly RoutedEvent TabPinnedEvent
Field Value
System.
|
TabStripPlacementProperty
Identifies the Tab
Declaration
public static readonly DependencyProperty TabStripPlacementProperty
Field Value
System.
|
TabUnpinnedEvent
Registers the Tab
Declaration
public static readonly RoutedEvent TabUnpinnedEvent
Field Value
System.
|
TopTemplateProperty
Identifies the Top
Declaration
public static readonly DependencyProperty TopTemplateProperty
Field Value
System.
|
Properties
AdditionalContent
Identifies the AdditionalContent property.
Declaration
public object AdditionalContent { get; set; }
Property Value
System.
|
Align
Gets or sets the alignment of the tab items in the row - Left, Right, Center, Justify. This is a dependency property.
Declaration
[SRDescription("TabControlAlignDescription")]
[SRCategory("AppearanceCategory")]
public TabStripAlign Align { get; set; }
Property Value
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.
See Also
AllowDragOverTab
Gets or sets a value indicating whether dragging objects over a tab item will select this TabItem. This is a dependency property.
Declaration
[SRCategory("Behavior")]
public bool AllowDragOverTab { get; set; }
Property Value
System.
|
Remarks
The DragOverTab feature will work only if the Rad
The default value is false.
AllowDragReorder
Gets or sets a value indicating whether the user will be able to rearrange the tabs with dragging. This is a dependency property.
Declaration
[SRCategory("Behavior")]
public bool AllowDragReorder { get; set; }
Property Value
System.
|
Remarks
The default value is false.
AllTabsEqualHeight
Gets or sets whether all displayed tabs have equal height. This is a dependency property.
Declaration
[SRCategory("AppearanceCategory")]
[SRDescription("TabControlAllTabsEqualHeightDescription")]
public bool AllTabsEqualHeight { get; set; }
Property Value
System.
|
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
Gets or sets the template of the tab control when the Tab
Declaration
[SRCategory("Appearance")]
[SRDescription("TabControlBottomTemplateDescription")]
public ControlTemplate BottomTemplate { get; set; }
Property Value
System.
|
Remarks
For more information, please see Top
CloseTabsOnMouseMiddleButtonDown
Gets or sets a value indicating whether user can close tabs by clicking the mouse middle button over a particular Rad
Declaration
public bool CloseTabsOnMouseMiddleButtonDown { get; set; }
Property Value
System.
|
DropDownButtonStyle
Gets or sets the style for the Telerik.
Declaration
[SRCategory("AppearanceCategory")]
public Style DropDownButtonStyle { get; set; }
Property Value
System.
|
DropDownDisplayMemberPath
Gets or sets the name of property that will be used to display tab items in the
Telerik.
Declaration
public string DropDownDisplayMemberPath { get; set; }
Property Value
System.
|
DropDownDisplayMode
Gets or sets when the Telerik.
Declaration
public TabControlDropDownDisplayMode DropDownDisplayMode { get; set; }
Property Value
DropDownStyle
Gets or sets the style for the Telerik.
Declaration
[SRCategory("AppearanceCategory")]
public Style DropDownStyle { get; set; }
Property Value
System.
|
InvertMouseWheelScrollDirection
Inverts the scrolling direction when using the mouse wheel over the tab strip panel.
Declaration
public bool InvertMouseWheelScrollDirection { get; set; }
Property Value
System.
|
IsDropDownOpen
Gets or sets a value indicating whether the Telerik.
Declaration
[SRCategory("AppearanceCategory")]
public bool IsDropDownOpen { get; set; }
Property Value
System.
|
ItemDropDownContentTemplate
Gets or sets the System.
Declaration
[SRCategory("AppearanceCategory")]
public DataTemplate ItemDropDownContentTemplate { get; set; }
Property Value
System.
|
ItemDropDownContentTemplateSelector
Gets or sets the DataTemplateSelector that will be used to display the items
in the drop down menu if they do not have a Item
Declaration
[SRCategory("AppearanceCategory")]
public DataTemplateSelector ItemDropDownContentTemplateSelector { get; set; }
Property Value
System.
|
LeftTemplate
Gets or sets the template of the tab control when the Tab
Declaration
[SRCategory("Appearance")]
[SRDescription("TabControlLeftTemplateDescription")]
public ControlTemplate LeftTemplate { get; set; }
Property Value
System.
|
Remarks
For more information, please see Top
OverflowMode
Gets or sets what happens when the width of the tab items exceeds the available width. They will either scroll or wrap.
Declaration
public TabOverflowMode OverflowMode { get; set; }
Property Value
PinnedItems
Gets the collection of currently pinned Rad
Declaration
public ReadOnlyObservableCollection<RadTabItem> PinnedItems { get; }
Property Value
System.
|
RightTemplate
Gets or sets the template of the tab control when the Tab
Declaration
[SRCategory("Appearance")]
[SRDescription("TabControlRightTemplateDescription")]
public ControlTemplate RightTemplate { get; set; }
Property Value
System.
|
Remarks
For more information, please see Top
ScrollMode
Gets or sets the type of scrolling that will occur when the user presses the scroll buttons. This is a dependency property.
Declaration
public TabControlScrollMode ScrollMode { get; set; }
Property Value
TabOrientation
Gets or sets the orientation of the TabItems in the TabControl. This is a dependency property.
Declaration
[SRCategory("AppearanceCategory")]
[SRDescription("TabControlTabOrientationDescription")]
public Orientation TabOrientation { get; set; }
Property Value
System.
|
Remarks
The TabOrientation property allows you to set the orientation of the tab items.
The default value is
The following examples show how TabOrientation can be set:
Please note that you need the telerik namespace to be defined in your XAML.
TabStripPlacement
Gets or sets the position of the tab strip with regard to the content. This is a dependency property.
Declaration
[SRCategory("AppearanceCategory")]
[SRDescription("TabControlTabStripPlacementDescription")]
public Dock TabStripPlacement { get; set; }
Property Value
System.
|
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
Gets or sets the template of the tab control when the Tab
Declaration
[SRCategory("Appearance")]
[SRDescription("TabControlTopTemplateDescription")]
public ControlTemplate TopTemplate { get; set; }
Property Value
System.
|
Remarks
There are four properties that set the templates of the TabControl: Top
In order to set the templates for the tab items, the respective tab item properties should be used.
If the tab items are generated (System.
Methods
add_ItemReordered(ItemReorderedEventHandler)
Declaration
public virtual void add_ItemReordered(ItemReorderedEventHandler value)
Parameters
ChangeVisualState(Boolean)
Updates the visual states of the control.
Declaration
protected override void ChangeVisualState(bool useTransitions)
Parameters
System. Identifies whether the transitions should be used. |
Overrides
ClearContainerForItemOverride(DependencyObject, Object)
When overridden in a derived class, undoes the effects of the
System.
Declaration
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameters
System. The container element. |
System. The item. |
FindTemplateFromPosition(Dock)
Returns a template for the given position of the tab strip.
Declaration
protected virtual ControlTemplate FindTemplateFromPosition(Dock position)
Parameters
System. The position for which a template is requested. |
Returns
System. An instance of the template for the given position. |
GetContainer()
Returns a new instance of the control that implements the IRad
Declaration
protected override IRadTabItem GetContainer()
Returns
Overrides
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes
(such as a rebuilding layout pass) call System.
Declaration
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Creates a Telerik.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System. An instance of the Telerik. |
OnDropDownMenuItemClick(Object, RoutedEventArgs)
Called when a Telerik.
Declaration
protected virtual void OnDropDownMenuItemClick(object sender, RoutedEventArgs e)
Parameters
System. The sender of the event. |
System. The arguments of the event. |
OnInitialized(EventArgs)
Raises the System.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System. The System. |
OnIsDropDownOpenChanged(Boolean, Boolean)
Called when the Is
Declaration
protected virtual void OnIsDropDownOpenChanged(bool oldValue, bool newValue)
Parameters
System. The old value of the property. |
System. The new value of the property. |
OnItemsChanged(NotifyCollectionChangedEventArgs)
Invoked when the System.
Declaration
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters
System. Information about the change. |
OnItemsPanelChanged(ItemsPanelTemplate, ItemsPanelTemplate)
Invoked when the System.
Declaration
protected override void OnItemsPanelChanged(ItemsPanelTemplate oldItemsPanel, ItemsPanelTemplate newItemsPanel)
Parameters
System. Old value of the Items |
System. New value of the Items |
OnLeftScrollButtonClick(Object, RoutedEventArgs)
Invoked when the left scroll button has been clicked.
Declaration
protected virtual void OnLeftScrollButtonClick(object sender, RoutedEventArgs e)
Parameters
System.
|
System.
|
OnPreviewTabClosed(PreviewTabChangedEventArgs)
Raises the Preview
Declaration
protected virtual bool OnPreviewTabClosed(PreviewTabChangedEventArgs args)
Parameters
Preview The Preview |
Returns
System.
|
OnPreviewTabPinned(PreviewTabChangedEventArgs)
Raises the Preview
Declaration
protected virtual bool OnPreviewTabPinned(PreviewTabChangedEventArgs args)
Parameters
Preview The Preview |
Returns
System.
|
OnPreviewTabUnpinned(PreviewTabChangedEventArgs)
Raises the Preview
Declaration
protected virtual bool OnPreviewTabUnpinned(PreviewTabChangedEventArgs args)
Parameters
Preview The Preview |
Returns
System.
|
OnRightScrollButtonClick(Object, RoutedEventArgs)
Invoked when the right scroll button has been clicked.
Declaration
protected virtual void OnRightScrollButtonClick(object sender, RoutedEventArgs e)
Parameters
System.
|
System.
|
OnScrollButtonsVisibilityChanged()
Invoked when scroll buttons visibility changes.
Declaration
protected virtual void OnScrollButtonsVisibilityChanged()
OnSelectionChanged(RadSelectionChangedEventArgs)
Raises the SelectionChanged routed event and selection automation events.
Declaration
protected override void OnSelectionChanged(RadSelectionChangedEventArgs e)
Parameters
Overrides
OnTabClosed(TabChangedEventArgs)
Raises the Tab
Declaration
protected virtual void OnTabClosed(TabChangedEventArgs args)
Parameters
Tab The Tab |
OnTabPinned(TabChangedEventArgs)
Raises the Tab
Declaration
protected virtual void OnTabPinned(TabChangedEventArgs args)
Parameters
Tab The Tab |
OnTabUnpinned(TabChangedEventArgs)
Raises the Tab
Declaration
protected virtual void OnTabUnpinned(TabChangedEventArgs args)
Parameters
Tab The Tab |
PrepareContainerForItemOverride(DependencyObject, Object)
Prepares the specified element to display the specified item.
Declaration
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters
System. Element used to display the specified item. |
System. Specified item. |
remove_ItemReordered(ItemReorderedEventHandler)
Declaration
public virtual void remove_ItemReordered(ItemReorderedEventHandler value)
Parameters
ScrollIntoView(Object)
Scrolls the container of given item into view.
Declaration
public void ScrollIntoView(object item)
Parameters
System. The item to scroll into view. |
UpdateSelectedContentProperties()
Updates the selected content properties Selected
Declaration
protected override void UpdateSelectedContentProperties()
Overrides
UpdateTabStrip()
Updates the tab strip.
Declaration
protected void UpdateTabStrip()
Events
ItemReordered
Occurs when a item is reordered while dragging. This is a RoutedEvent.
Declaration
public virtual event ItemReorderedEventHandler ItemReordered
Event Type
PreviewTabClosed
Occurs when a Rad
Declaration
public event EventHandler<PreviewTabChangedEventArgs> PreviewTabClosed
Event Type
System.
|
PreviewTabPinned
Occurs when a Rad
Declaration
public event EventHandler<PreviewTabChangedEventArgs> PreviewTabPinned
Event Type
System.
|
PreviewTabUnpinned
Occurs when a Rad
Declaration
public event EventHandler<PreviewTabChangedEventArgs> PreviewTabUnpinned
Event Type
System.
|
TabClosed
Occurs when a Rad
Declaration
public event EventHandler<TabChangedEventArgs> TabClosed
Event Type
System.
|
TabPinned
Occurs when a Rad
Declaration
public event EventHandler<TabChangedEventArgs> TabPinned
Event Type
System.
|
TabUnpinned
Occurs when a Rad
Declaration
public event EventHandler<TabChangedEventArgs> TabUnpinned
Event Type
System.
|