• Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Design
    Unite UX
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadTabItem

Represents a tab item, the default item of the RadTabControl.

Inheritance
System.Object
RadTabItem
RadOutlookBarItem
RadPane
RadRibbonBackstageItem
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.Navigation.dll

Syntax

[TelerikToolboxCategory("Navigation")]
public class RadTabItem : HeaderedContentControl, IRadTabItem
Remarks

The RadTabItem class is the default item of the RadTabControl. The TabItem appears in the TabStrip of the TabControl while the contents of its System.Windows.Controls.ContentControl.Content property are shown when the Tab is selected.

When tabs are inserted into the TabControl the last Tab to have its IsSelected property set to true would be selected.

You can change the look of the Control by setting the Theme, Style or Control Template properties. To change the look of all the TabItems in a TabControl, use the System.Windows.Controls.ItemsControl.ItemContainerStyle and System.Windows.Controls.ItemsControl.ItemContainerStyleSelector

The RadTabItem is not meant to be used on its own but as item of the RadTabControl. The TabItems will be automatically created if other items are inserted in the RadTabControl.

Please note that the TabStripPlacement and TabOrientation properties are set by the TabControl and as such are read-only.

Constructors

RadTabItem()

Initializes a new instance of the RadTabItem class.

Declaration
public RadTabItem()
Remarks

The RadTabItem is a System.Windows.Controls.HeaderedContentControl. Please see RadTabItem for more information.

See Also
RadTabItem

Fields

BottomTemplateProperty

Identifies the property.

Declaration
public static readonly DependencyProperty BottomTemplateProperty
Field Value
System.Windows.DependencyProperty

CloseButtonVisibilityProperty

Identifies the dependency property.

Declaration
public static readonly DependencyProperty CloseButtonVisibilityProperty
Field Value
System.Windows.DependencyProperty

DropDownContentProperty

Identifies the DropDownContent property.

Declaration
public static readonly DependencyProperty DropDownContentProperty
Field Value
System.Windows.DependencyProperty

DropDownContentTemplateProperty

Identifies the DropDownContentTemplate property.

Declaration
public static readonly DependencyProperty DropDownContentTemplateProperty
Field Value
System.Windows.DependencyProperty

DropDownContentTemplateSelectorProperty

Identifies the DropDownTemplateSelector property.

Declaration
public static readonly DependencyProperty DropDownContentTemplateSelectorProperty
Field Value
System.Windows.DependencyProperty

HeaderForegroundProperty

Identifies the HeaderForeground property.

Declaration
public static readonly DependencyProperty HeaderForegroundProperty
Field Value
System.Windows.DependencyProperty

IsBreakProperty

Identifies the dependency property.

Declaration
public static readonly DependencyProperty IsBreakProperty
Field Value
System.Windows.DependencyProperty

See Also
IsBreak

IsDragDisabledProperty

Identifies the IsDragDisabled property.

Declaration
public static readonly DependencyProperty IsDragDisabledProperty
Field Value
System.Windows.DependencyProperty

IsPinnedProperty

Identifies the dependency property.

Declaration
public static readonly DependencyProperty IsPinnedProperty
Field Value
System.Windows.DependencyProperty

IsSelectedProperty

Identifies the property.

Declaration
public static readonly DependencyProperty IsSelectedProperty
Field Value
System.Windows.DependencyProperty

See Also
IsSelected

LeftTemplateProperty

Identifies the property.

Declaration
public static readonly DependencyProperty LeftTemplateProperty
Field Value
System.Windows.DependencyProperty

PinButtonVisibilityProperty

Identifies the dependency property.

Declaration
public static readonly DependencyProperty PinButtonVisibilityProperty
Field Value
System.Windows.DependencyProperty

RightTemplateProperty

Identifies the property.

Declaration
public static readonly DependencyProperty RightTemplateProperty
Field Value
System.Windows.DependencyProperty

TabOrientationProperty

Identifies the property.

Declaration
public static readonly DependencyProperty TabOrientationProperty
Field Value
System.Windows.DependencyProperty

TabStripPlacementProperty

Identifies the property.

Declaration
public static readonly DependencyProperty TabStripPlacementProperty
Field Value
System.Windows.DependencyProperty

TopTemplateProperty

Identifies the property.

Declaration
public static readonly DependencyProperty TopTemplateProperty
Field Value
System.Windows.DependencyProperty

Properties

BottomTemplate

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

Declaration
public virtual ControlTemplate BottomTemplate { get; set; }
Property Value
System.Windows.Controls.ControlTemplate

CloseButtonVisibility

Gets or sets a value indicating the visibility of the close button.

Declaration
public Visibility CloseButtonVisibility { get; set; }
Property Value
System.Windows.Visibility

DropDownContent

Gets or sets the content that will appear in the DropDown menu when it is shown. This is a dependency property.

Declaration
public object DropDownContent { get; set; }
Property Value
System.Object

DropDownContentTemplate

Gets or sets the template for the MenuItem that will present this item in the DropDown menu. This is a dependency property.

Declaration
public DataTemplate DropDownContentTemplate { get; set; }
Property Value
System.Windows.DataTemplate

DropDownContentTemplateSelector

Gets or sets the template selector for the MenuItem that will present this item in the DropDown menu. This is a dependency property.

Declaration
public DataTemplateSelector DropDownContentTemplateSelector { get; set; }
Property Value
System.Windows.Controls.DataTemplateSelector

HeaderForeground

Gets or sets the item header foreground.

Declaration
public Brush HeaderForeground { get; set; }
Property Value
System.Windows.Media.Brush

IsBreak

Gets or sets a value indicating whether this instance is break.

Declaration
public virtual bool IsBreak { get; set; }
Property Value
System.Boolean

true if this instance is break; otherwise, false.

IsDragDisabled

Gets or sets a value indicating whether this instance can be dragged.

Declaration
public bool IsDragDisabled { get; set; }
Property Value
System.Boolean

true if this instance can be dragged; otherwise, false.

IsPinned

Gets or sets a value indicating whether this tab item instance is pinned.

Declaration
public bool IsPinned { get; set; }
Property Value
System.Boolean

IsSelected

Gets or sets whether the TabItem is selected. This is a dependency property.

Declaration
public bool IsSelected { get; set; }
Property Value
System.Boolean

Implements
IRadTabItem.IsSelected
Remarks

When another item is selected, IsSelected will change to false.

Multiple TabItems with their property set to true can be added to the TabControl, only the last one to be added will be selected.

LeftTemplate

Gets or sets the left template.

Declaration
public virtual ControlTemplate LeftTemplate { get; set; }
Property Value
System.Windows.Controls.ControlTemplate

The left template.

PinButtonVisibility

Gets or sets a value indicating the visibility of the pin button.

Declaration
public Visibility PinButtonVisibility { get; set; }
Property Value
System.Windows.Visibility

RightTemplate

Gets or sets the right template.

Declaration
public virtual ControlTemplate RightTemplate { get; set; }
Property Value
System.Windows.Controls.ControlTemplate

The right template.

TabOrientation

Gets the tab orientation.

Declaration
public virtual Orientation TabOrientation { get; }
Property Value
System.Windows.Controls.Orientation

TabStripPlacement

Gets the tab strip placement.

Declaration
public virtual Dock TabStripPlacement { get; }
Property Value
System.Windows.Controls.Dock

Implements
IRadTabItem.TabStripPlacement

TopTemplate

Gets or sets the top template.

Declaration
public virtual ControlTemplate TopTemplate { get; set; }
Property Value
System.Windows.Controls.ControlTemplate

The top template.

Methods

ChangeVisualState(Boolean)

Updates the visual state of the control.

Declaration
protected virtual void ChangeVisualState(bool useTransitions)
Parameters
System.Boolean useTransitions

Indicates whether transitions should be used.

FindTemplateFromPosition(Dock)

Returns the template that will be used, based on the position of the TabStrip.

Declaration
protected virtual ControlTemplate FindTemplateFromPosition(Dock position)
Parameters
System.Windows.Controls.Dock position

The position for which to return a template.

Returns
System.Windows.Controls.ControlTemplate

A control template to use.

MeasureOverride(Size)

When implemented in a derived class, provides the behavior for the "Measure" layout pass.

Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
System.Windows.Size availableSize

The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available.

Returns
System.Windows.Size

The size that this element determines it needs during layout, based on its calculations of child element sizes.

OnApplyTemplate()

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

Declaration
public override void OnApplyTemplate()

OnContentChanged(Object, Object)

Called when the System.Windows.Controls.ContentControl.Content property changes.

Declaration
protected override void OnContentChanged(object oldContent, object newContent)
Parameters
System.Object oldContent

The old value of the System.Windows.Controls.ContentControl.Content property.

System.Object newContent

The new value of the System.Windows.Controls.ContentControl.Content property.

OnCreateAutomationPeer()

Creates a RadTabItemAutomationPeer.

Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.Windows.Automation.Peers.AutomationPeer

A new instance of the RadTabItemAutomationPeer.

OnGotFocus(RoutedEventArgs)

Called before the System.Windows.UIElement.GotFocus event occurs.

Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
System.Windows.RoutedEventArgs e

The data for the event.

OnHeaderChanged(Object, Object)

Called when the System.Windows.Controls.HeaderedContentControl.Header property of a System.Windows.Controls.HeaderedContentControl changes.

Declaration
protected override void OnHeaderChanged(object oldHeader, object newHeader)
Parameters
System.Object oldHeader

Old value of the System.Windows.Controls.HeaderedContentControl.Header property.

System.Object newHeader

New value of the System.Windows.Controls.HeaderedContentControl.Header property.

OnHeaderMouseEnter(Object, MouseEventArgs)

Declaration
protected virtual void OnHeaderMouseEnter(object sender, MouseEventArgs e)
Parameters
System.Object sender

System.Windows.Input.MouseEventArgs e

OnHeaderMouseLeave(Object, MouseEventArgs)

Declaration
protected virtual void OnHeaderMouseLeave(object sender, MouseEventArgs e)
Parameters
System.Object sender

System.Windows.Input.MouseEventArgs e

OnHeaderMouseLeftButtonDown(Object, MouseButtonEventArgs)

Called when the mouse is pressed over the header of the TabItem.

Declaration
protected virtual void OnHeaderMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
Parameters
System.Object sender

The header element sender.

System.Windows.Input.MouseButtonEventArgs e

The MouseEventArgs for the event.

OnHeaderMouseLeftButtonUp(Object, MouseButtonEventArgs)

Called when the left mouse button is release over the header of the TabItem.

Declaration
protected virtual void OnHeaderMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
Parameters
System.Object sender

The header element sender.

System.Windows.Input.MouseButtonEventArgs e

The MouseEventArgs for the event.

OnInitialized(EventArgs)

Called when the control has been initialized.

Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System.EventArgs e

OnIsSelectedChanged(Boolean, Boolean)

Called when the IsSelected property has changed.

Declaration
protected virtual void OnIsSelectedChanged(bool oldValue, bool newValue)
Parameters
System.Boolean oldValue

The old value of the IsSelected property.

System.Boolean newValue

The new value of the IsSelected property.

OnKeyDown(KeyEventArgs)

Called before the System.Windows.UIElement.KeyDown event occurs.

Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
System.Windows.Input.KeyEventArgs e

The data for the event.

OnLoaded(Object, RoutedEventArgs)

Called when the RadTabItem is loaded.

Declaration
protected virtual void OnLoaded(object sender, RoutedEventArgs e)
Parameters
System.Object sender

The tab item that has loaded.

System.Windows.RoutedEventArgs e

The event arguments.

OnLostFocus(RoutedEventArgs)

Called before the System.Windows.UIElement.LostFocus event occurs.

Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
System.Windows.RoutedEventArgs e

The data for the event.

OnMouseEnter(MouseEventArgs)

Called before the System.Windows.UIElement.MouseEnter event occurs.

Declaration
protected override void OnMouseEnter(MouseEventArgs e)
Parameters
System.Windows.Input.MouseEventArgs e

The data for the event.

OnMouseLeave(MouseEventArgs)

Called before the System.Windows.UIElement.MouseLeave event occurs.

Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
System.Windows.Input.MouseEventArgs e

The data for the event.

OnSelected(RadRoutedEventArgs)

Called when the item is selected.

Declaration
public virtual void OnSelected(RadRoutedEventArgs e)
Parameters
RadRoutedEventArgs e

OnUnselected(RadRoutedEventArgs)

Called when the item is unselected.

Declaration
public virtual void OnUnselected(RadRoutedEventArgs e)
Parameters
RadRoutedEventArgs e

SetNavigationMode(KeyboardNavigationMode)

Sets the navigation mode for RadTabItem.

Declaration
protected void SetNavigationMode(KeyboardNavigationMode mode)
Parameters
System.Windows.Input.KeyboardNavigationMode mode

The mode.

UpdateTemplate()

Updates the template of the TabItem depending on its properties.

Declaration
protected void UpdateTemplate()

Explicit Interface Implementations

IRadTabItem.Control

Gets an a reference to the control that implements the IRadTabItem interface.

Declaration
Control IRadTabItem.Control { get; }
Returns
System.Windows.Controls.Control

Implements
IRadTabItem.Control

IRadTabItem.SetTabOrientation(Orientation)

Declaration
void IRadTabItem.SetTabOrientation(Orientation value)
Parameters
System.Windows.Controls.Orientation value

Implements
IRadTabItem.SetTabOrientation(Orientation)

IRadTabItem.UpdateHeaderPresenterContent()

The header is update via code from here since TemplateBindings breaks runtime theme changes when the header is an UIElement.

Declaration
void IRadTabItem.UpdateHeaderPresenterContent()
Implements
IRadTabItem.UpdateHeaderPresenterContent()

IRadTabItem.UpdateTabStripPlacement(Dock)

Declaration
void IRadTabItem.UpdateTabStripPlacement(Dock value)
Parameters
System.Windows.Controls.Dock value

Implements
IRadTabItem.UpdateTabStripPlacement(Dock)

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)

See Also

RadTabControl
IsSelected

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.