Class RadTabControlBase
A base class providing functionality to controls used to create tabbed interfaces.
Inheritance
Namespace: Telerik.Windows.Controls.TabControl
Assembly: Telerik.Windows.Controls.Navigation.dll
Syntax
public abstract class RadTabControlBase : MultiSelector
Constructors
RadTabControlBase()
Initializes a new instance of the Rad
Declaration
protected RadTabControlBase()
Fields
BackgroundVisibilityProperty
Identifies the Background
Declaration
public static readonly DependencyProperty BackgroundVisibilityProperty
Field Value
System.
|
ContentTemplateProperty
Identifies the Content
Declaration
public static readonly DependencyProperty ContentTemplateProperty
Field Value
System.
|
ContentTemplateSelectorProperty
Identifies the Content
Declaration
public static readonly DependencyProperty ContentTemplateSelectorProperty
Field Value
System.
|
DropDownClosedEvent
Identifies the Drop
Declaration
public static readonly RoutedEvent DropDownClosedEvent
Field Value
System.
|
DropDownOpenedEvent
Identifies the Drop
Declaration
public static readonly RoutedEvent DropDownOpenedEvent
Field Value
System.
|
HeaderBackgroundProperty
Identifies the Header
Declaration
public static readonly DependencyProperty HeaderBackgroundProperty
Field Value
System.
|
IsContentPreservedProperty
Identifies the Is
Declaration
public static readonly DependencyProperty IsContentPreservedProperty
Field Value
System.
|
PreviewSelectionChangedEvent
Identifies the Preview
Declaration
public static readonly RoutedEvent PreviewSelectionChangedEvent
Field Value
System.
|
PropagateItemDataContextToContentProperty
Identifies the Propagate
Declaration
public static readonly DependencyProperty PropagateItemDataContextToContentProperty
Field Value
System.
|
ReorderTabRowsProperty
Identifies the Reorder
Declaration
public static readonly DependencyProperty ReorderTabRowsProperty
Field Value
System.
|
SelectedContentProperty
Identifies the Selected
Declaration
public static readonly DependencyProperty SelectedContentProperty
Field Value
System.
|
SelectedContentTemplateProperty
Identifies the Selected
Declaration
public static readonly DependencyProperty SelectedContentTemplateProperty
Field Value
System.
|
SelectedContentTemplateSelectorProperty
Identifies the Selected
Declaration
public static readonly DependencyProperty SelectedContentTemplateSelectorProperty
Field Value
System.
|
SelectedItemRemoveBehaviourProperty
Identifies the Selected
Declaration
public static readonly DependencyProperty SelectedItemRemoveBehaviourProperty
Field Value
System.
|
SelectionChangedEvent
Identifies the Selection
Declaration
public static readonly RoutedEvent SelectionChangedEvent
Field Value
System.
|
Properties
BackgroundVisibility
Gets or sets the visibility of the background panel for the headers in the tab control. This is a dependency property.
Declaration
[SRCategory("AppearanceCategory")]
[SRDescription("TabControlBackgroundOpacityDescription")]
public virtual Visibility BackgroundVisibility { get; set; }
Property Value
System.
|
Remarks
This property gives you a quick way to change the visibility of the background without having to modify the ControlTemplate of the TabControl.
This property does not affect the visibility of the divider (the line between the items and the content). To change the divider, edit the appropriate control template.
The default value is Visible.
ContentElement
The ContentElement template part.
Declaration
protected ContentPresenter ContentElement { get; set; }
Property Value
System. The content element. |
ContentElementsPanel
The ContentElementsPanel template part.
Declaration
protected Grid ContentElementsPanel { get; set; }
Property Value
System. The content element. |
ContentTemplate
Gets or sets the System.
Declaration
[SRCategory("AppearanceCategory")]
public virtual DataTemplate ContentTemplate { get; set; }
Property Value
System.
|
ContentTemplateSelector
Gets or sets the DataTemplateSelector that will be used to select a data template for the items that do not have a ContentTemplate set. This is a dependency property.
Declaration
[SRCategory("AppearanceCategory")]
public virtual DataTemplateSelector ContentTemplateSelector { get; set; }
Property Value
System.
|
HeaderBackground
Gets or sets the background of the tab strip. This is a dependency property.
Declaration
[SRCategory("AppearanceCategory")]
public virtual Brush HeaderBackground { get; set; }
Property Value
System.
|
Remarks
This property gives you a quick way to change the tab strip background without having to modify the ControlTemplate of the TabControl.
IsContentPreserved
Gets or sets a value indicating whether the state of the content will be preserved when selection is changed.
Declaration
public virtual bool IsContentPreserved { get; set; }
Property Value
System.
|
IsDefaultItemSelected
Gets or sets a value indicating whether the first tab item will be selected by default on start up.
Declaration
public bool IsDefaultItemSelected { get; set; }
Property Value
System.
|
Item[Int32]
Indexer, gets the tab item with the given index in the items collection.
Declaration
public virtual IRadTabItem this[int index] { get; }
Parameters
System. The index of the tab item in the Items collection of tab control. |
Property Value
IRad The tab item with the given index in the Items collection of the tab control. |
Remarks
You can use the indexer to quickly get the item at given index. The indexer is a shortcut for the ContainerFromIndex method.
Note that you cannot use the indexer to change (replace) an item if you would like to do this use the
System.
PropagateItemDataContextToContent
Gets or sets a value indication whether the data context of the tab item should be assigned as DataContext of the content area when the selection changes. The default is true.
Declaration
public virtual bool PropagateItemDataContextToContent { get; set; }
Property Value
System.
|
Remarks
In Silverlight the DataContext is inherited visually and it may be expected that the content of a tab item will have its DataContext. This property specifies that the DataContext of the content area will be changed to assure this.
ReorderTabRows
Gets or sets whether the tab item rows would be reordered when selected. This is a dependency property.
Declaration
[SRCategory("BehaviourCategory")]
[SRDescription("TabControlReorderTabRowsDescription")]
public virtual bool ReorderTabRows { get; set; }
Property Value
System.
|
Remarks
The ReorderTabRows property governs the behavior of the tab items when selected. Its effect can only be observed when more than one row of tab items are present.
Setting the property to true would make the rows in the Tab
Please note that the index of each item remains the same even when reordered.
The default value is true.
SelectedContent
Gets the content of the selected item. This is a dependency property.
Declaration
public virtual object SelectedContent { get; set; }
Property Value
System.
|
Remarks
The SelectedContent property returns the content of the currently selected item.
If no items are selected, the property would return null.
SelectedContentTemplate
Gets the content template of the currently selected item. Do not set this property because it is changed internally. This is a dependency property.
Declaration
public virtual DataTemplate SelectedContentTemplate { get; set; }
Property Value
System.
|
Remarks
The ContentTemplate property returns the content template of the currently selected item.
Note that the property cannot be set. To change the ContentTemplate of the tab items, use the
System.
SelectedContentTemplateSelector
Gets the DataTemplateSelector for the currently selected item. Do not set this property because it is changed internally. This is a dependency property.
Declaration
[SRCategory("AppearanceCategory")]
public virtual DataTemplateSelector SelectedContentTemplateSelector { get; set; }
Property Value
System.
|
SelectedItemRemoveBehaviour
Determines what item should be selected when SelectedItem is removed.
Declaration
public SelectedItemRemoveBehaviour SelectedItemRemoveBehaviour { get; set; }
Property Value
SelectedItems
SelectedItems property is not supported by this control.
Declaration
public IList SelectedItems { get; }
Property Value
System.
|
SupressSelectedContentTemplateReapplying
Gets or sets a value indicating whether the ContentPresenter rendering the tab items must refresh its data template on selection change. This property must be use in case when visual objects are used in the view model child collection bound to the tab control.
Declaration
public virtual bool SupressSelectedContentTemplateReapplying { get; set; }
Property Value
System.
|
TabFlags
Gets the flags.
Declaration
protected RadTabControlBase.TabControlState TabFlags { get; }
Property Value
TabStrip
Gets or sets the tab strip. The tab strip visually represents the headers of tab items.
Declaration
protected Panel TabStrip { get; set; }
Property Value
System. The tab strip. |
Methods
add_DropDownClosed(DropDownEventHandler)
Declaration
public virtual void add_DropDownClosed(DropDownEventHandler value)
Parameters
Drop
|
add_DropDownOpened(DropDownEventHandler)
Declaration
public virtual void add_DropDownOpened(DropDownEventHandler value)
Parameters
Drop
|
add_PreviewSelectionChanged(RadSelectionChangedEventHandler)
Declaration
public void add_PreviewSelectionChanged(RadSelectionChangedEventHandler value)
Parameters
add_SelectionChanged(RadSelectionChangedEventHandler)
Declaration
public void add_SelectionChanged(RadSelectionChangedEventHandler value)
Parameters
AddDropDownClosedHandler(UIElement, DropDownEventHandler)
Adds a handler to the target for the DropDownClosed routed event.
Declaration
public static void AddDropDownClosedHandler(UIElement target, DropDownEventHandler handler)
Parameters
System. The target element to add a handler to. |
Drop The handler to add for this event. |
AddDropDownOpenedHandler(UIElement, DropDownEventHandler)
Adds a handler to the target for the DropDownOpened routed event.
Declaration
public static void AddDropDownOpenedHandler(UIElement target, DropDownEventHandler handler)
Parameters
System. The target element to add a handler to. |
Drop The handler to add for this event. |
ChangeVisualState(Boolean)
Updates the visual states of the control.
Declaration
protected virtual void ChangeVisualState(bool useTransitions)
Parameters
System. Identifies whether the transitions should be used. |
ClearContentSafely()
Clears all ContentPresenter elements inside the ContentElementStorage template part and clears the ContentElement template part. Also clears the ContentElementStorage children used to represent content from different tab items.
Declaration
protected void ClearContentSafely()
GetContainer()
Returns a new instance of the control that implements the IRad
Declaration
protected virtual IRadTabItem GetContainer()
Returns
GetContainerForItemOverride()
Creates the element that is used to display the given item.
Declaration
protected override DependencyObject GetContainerForItemOverride()
Returns
System.
|
GoToState(Boolean, String[])
Attempts to move the control to one of the states in the list.
Declaration
protected void GoToState(bool useTransitions, params string[] stateNames)
Parameters
System. Indicates whether transitions should be used. |
System. The names of the states that should be reached. |
IsItemItsOwnContainerOverride(Object)
Determines if the specified item is (or is eligible to be) its own container.
Declaration
protected override bool IsItemItsOwnContainerOverride(object item)
Parameters
System. The item to check. |
Returns
System. True if the item is (or is eligible to be) its own container; otherwise, false. |
IsSelectionNonBoundAtClientSide()
Determines of user has no bindings to SelectedIndex or SelectedItem properties.
Declaration
protected virtual bool IsSelectionNonBoundAtClientSide()
Returns
System.
|
OnPreviewSelectionChanged(SelectionChangedEventArgs)
Raises the PreviewSelectionChangedEvent.
Declaration
protected virtual void OnPreviewSelectionChanged(SelectionChangedEventArgs e)
Parameters
System.
|
OnSelectionChanged(RadSelectionChangedEventArgs)
Raises the SelectionChanged routed event.
Declaration
protected virtual void OnSelectionChanged(RadSelectionChangedEventArgs e)
Parameters
remove_DropDownClosed(DropDownEventHandler)
Declaration
public virtual void remove_DropDownClosed(DropDownEventHandler value)
Parameters
Drop
|
remove_DropDownOpened(DropDownEventHandler)
Declaration
public virtual void remove_DropDownOpened(DropDownEventHandler value)
Parameters
Drop
|
remove_PreviewSelectionChanged(RadSelectionChangedEventHandler)
Declaration
public void remove_PreviewSelectionChanged(RadSelectionChangedEventHandler value)
Parameters
remove_SelectionChanged(RadSelectionChangedEventHandler)
Declaration
public void remove_SelectionChanged(RadSelectionChangedEventHandler value)
Parameters
RemoveDropDownClosedHandler(UIElement, DropDownEventHandler)
Removes a handler to the target for the DropDownClosed routed event.
Declaration
public static void RemoveDropDownClosedHandler(UIElement target, DropDownEventHandler handler)
Parameters
System. The target element to remove a handler from. |
Drop The handler to remove for this element. |
RemoveDropDownOpenedHandler(UIElement, DropDownEventHandler)
Removes a handler to the target for the DropDownOpened routed event.
Declaration
public static void RemoveDropDownOpenedHandler(UIElement target, DropDownEventHandler handler)
Parameters
System. The target element to remove a handler from. |
Drop The handler to remove for this element. |
Selector_SelectionChanged(Object, SelectionChangedEventArgs)
Handles the System.
Declaration
protected virtual void Selector_SelectionChanged(object sender, SelectionChangedEventArgs e)
Parameters
System. The source of the event. |
System. The instance containing the event data. |
UpdateFocusOnSelectionChange()
Updates the focus. This method should be called after selection of tab item in order to focus the appropriate element.
If the focus is outside the tab or in the contents of the previously selected tab item
then the first element in the selected tab contents will be focused.
If the Tab
Declaration
protected virtual void UpdateFocusOnSelectionChange()
UpdateSelectedContentProperties()
Updates the selected content properties Selected
Declaration
protected virtual void UpdateSelectedContentProperties()
UpdateTabRows()
Visually updates the tab rows.
Declaration
protected virtual void UpdateTabRows()
Events
DropDownClosed
An event that is raised when the Drop
Declaration
public virtual event DropDownEventHandler DropDownClosed
Event Type
DropDownOpened
An event that is raised when the Drop
Declaration
public virtual event DropDownEventHandler DropDownOpened
Event Type
PreviewSelectionChanged
The preview event for Selection
Declaration
public event RadSelectionChangedEventHandler PreviewSelectionChanged
Event Type
SelectionChanged
Occurs when a changed has been made to the selection. This is a RoutedEvent.
Declaration
[SRDescription("TabControlSelectionChangedDescription")]
public event RadSelectionChangedEventHandler SelectionChanged