Class RadTabItem
Represents a tab item, the default item of the RadTabControl.
Inherited Members
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.Navigation.dll
Syntax
[TelerikToolboxCategory("Navigation")]
public class RadTabItem : HeaderedContentControl, ISelectable, 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 ItemContainerStyle and 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 HeaderedContentControl. Please see RadTabItem for more information.
See Also
Fields
BottomTemplateProperty
Identifies the property.
Declaration
public static readonly DependencyProperty BottomTemplateProperty
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
IsDragDisabledProperty
Identifies the IsDragDisabled property.
Declaration
public static readonly DependencyProperty IsDragDisabledProperty
Field Value
System.Windows.DependencyProperty
|
IsMouseOverProperty
Identifies the property.
Declaration
public static readonly DependencyProperty IsMouseOverProperty
Field Value
System.Windows.DependencyProperty
|
See Also
IsSelectedProperty
Identifies the property.
Declaration
public static readonly DependencyProperty IsSelectedProperty
Field Value
System.Windows.DependencyProperty
|
See Also
LeftTemplateProperty
Identifies the property.
Declaration
public static readonly DependencyProperty LeftTemplateProperty
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
|
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
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
|
IsDragDisabled
Gets or sets a value indicating whether this instance can be dragged.
Declaration
public bool IsDragDisabled { get; set; }
Property Value
System.Boolean
|
IsMouseOver
Gets whether the mouse is over the control. This is a dependency property.
Declaration
public bool IsMouseOver { get; }
Property Value
System.Boolean
|
Remarks
The IsMouseOver indicates whether the mouse is over the TabItem. The property can be used in DataBinding.
The property is read-only.
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
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. |
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
Dock
|
Implements
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 override void ChangeVisualState(bool useTransitions)
Parameters
System.Boolean
useTransitions
Indicates whether transitions should be used. |
Overrides
FindTemplateFromPosition(Dock)
Returns the template that will be used, based on the position of the TabStrip.
Declaration
protected virtual ControlTemplate FindTemplateFromPosition(Dock position)
Parameters
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()
Overrides
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. |
Overrides
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. |
Overrides
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. |
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. |
Overrides
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)
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.SetTabOrientation(Orientation)
Declaration
void IRadTabItem.SetTabOrientation(Orientation value)
Parameters
System.Windows.Controls.Orientation
value
|
Implements
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()