TabStripPanel
Hosts ordered TabPanel controls and synchronizes their selection with a page-view tab strip.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class TabStripPanel : SplitPanel, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlSplitPanelTabStripPanel...
Derived Classes:
Implements:
Inherited Members
Constructors
Creates an empty tab strip with strip visibility enabled by default; actual visibility depends on whether panels are present.
public TabStripPanel()
Fields
When true, suppresses automatic selection synchronization while child panels are added, reordered, removed, or handle creation initializes selection.
public static bool DisableSelection
When true, prevents UpdateTabSelection(bool) from performing its explicit focus transfer into a panel; it does not suppress focus caused by showing a hidden panel.
public static bool SuspendFocusChange
Properties
Gets the default alignment of the TabStripElement.
protected virtual TabStripAlignment DefaultTabStripAlignment { get; }
Gets the default text orientation.
protected virtual TabStripTextOrientation DefaultTabStripTextOrientation { get; }
Gets the point where the mouse was pressed and a drag operation has been instanciated.
[Browsable(false)]
public Point DragStart { get; }
Gets whether the tab-strip panel contains any tab panels. This checks collection count, not each panel's Visible state.
[Browsable(false)]
public bool HasVisibleTabPanels { get; }
Gets or sets the image list associated with this control. The control clears its reference when the image list is disposed.
public override ImageList ImageList { get; set; }
Overrides:
Gets or sets the selected panel index; -1 represents no selection. A change can be canceled through SelectedIndexChanging.
[Browsable(false)]
public int SelectedIndex { get; set; }
The value is less than -1 after the control handle has been created.
Gets or sets the selected panel. If the stored index is negative while panels exist, the getter records index zero but returns null on that read; the next read returns the first panel.
[Browsable(false)]
public TabPanel SelectedTab { get; set; }
Determines whether each tab item displays a close button for its corresponding panel.
public bool ShowItemCloseButton { get; set; }
Determines whether each tab item displays a pin button for its corresponding panel.
public bool ShowItemPinButton { get; set; }
Gets the content bounds remaining after the tab strip and its padding are accounted for; reading the property also updates strip visibility.
[Browsable(false)]
public virtual Rectangle TabPanelBounds { get; }
Gets the insets between this control's display rectangle and the current tab-panel content bounds.
protected Padding TabPanelPaddings { get; }
Gets the ordered collection of panels hosted by this tab strip.
public TabPanelCollection TabPanels { get; }
Gets or sets the alignment of the tab used to switch among child panels.
public TabStripAlignment TabStripAlignment { get; set; }
Gets the page-view strip element that renders and manages this panel's tab items.
[Browsable(false)]
public RadPageViewStripElement TabStripElement { get; }
Gets or sets the text orientation of the tab used to switch among child panels.
public TabStripTextOrientation TabStripTextOrientation { get; set; }
Determines whether the tab used to navigate among child panels is displayed.
public bool TabStripVisible { get; set; }
Methods
Creates the tab-strip element, configures its layout, and connects its selection and item-change events.
protected override void CreateChildItems(RadElement parent)
The root element that hosts the strip.
Overrides:
Creates the child-control collection that keeps tab panels and their strip items in sync.
protected override Control.ControlCollection CreateControlsInstance()
A collection that accepts TabPanel children and updates their tab items.
Overrides:
Creates the strip item associated with a panel; override to provide a specialized tab item.
protected virtual TabStripItem CreateTabItem(TabPanel tabPanel)
The panel represented by the item.
Returns:The item inserted into the page-view strip.
Creates the strip element used to display and reorder the tab items; override to supply a specialized element.
protected virtual RadPageViewTabStripElement CreateTabStripElementInstance()
The tab-strip element hosted by this panel.
If the panel at the specified index is selected, selects the following panel or wraps to the first panel.
public void DeselectTab(int index)
The zero-based index of the panel to deselect.
Exceptions: ArgumentOutOfRangeExceptionindex is outside the collection.
Deselects the named panel by selecting the following panel, or the first panel when the named panel is last.
public void DeselectTab(string tabPanelName)
The name of the panel to deselect.
Exceptions: ArgumentNullExceptiontabPanelName is null or no panel has that name.
Deselects the specified panel by selecting the following panel, or the first panel when it is last.
public void DeselectTab(TabPanel tabPanel)
The panel to deselect.
Exceptions: ArgumentNullExceptiontabPanel is null.
tabPanel is not in TabPanels.
Determines whether the tabstrip element is visible.
Treats Home, End, Page Up, and Page Down as input keys, but does not treat Alt-modified keys as input keys.
Provides a subclass hook after left-button movement exceeds the threshold for starting a panel drag.
protected virtual void OnDragInitialized(Point mouse)
The current pointer location in the tab-strip panel's client coordinates.
Selects the first panel when the stored index is invalid, then synchronizes the panel and strip selection unless selection updates are disabled.
protected override void OnHandleCreated(EventArgs e)
Event data for handle creation.
Overrides:
Updates the active panel's bounds before the base layout pass.
protected override void OnLayout(LayoutEventArgs e)
Layout event data.
Overrides:
Clears the dragging flag when this control loses mouse capture.
protected override void OnMouseCaptureChanged(EventArgs e)
Event data for the capture change.
Overrides:
Resets the drag origin and records the client location of a left-button press.
protected override void OnMouseDown(MouseEventArgs e)
The mouse input being processed.
Overrides:
Starts a panel drag after left-button movement passes the drag threshold.
protected override void OnMouseMove(MouseEventArgs e)
The mouse movement being processed.
Overrides:
Raises SelectedIndexChanged after the selected index is applied.
protected virtual void OnSelectedIndexChanged(EventArgs e)
Event data for the completed selection change.
Raises SelectedIndexChanging so handlers can cancel the pending selection.
protected virtual void OnSelectedIndexChanging(TabStripPanelSelectedIndexChangingEventArgs e)
The old and requested panel indices and the cancel flag.
Handles the click of a CloseButton on a child TabStripItem. Closes the corresponding TabPanel by default.
Applies the new strip alignment to the page-view element and recalculates layout.
protected virtual void OnTabStripAlignmentChanged(EventArgs e)
Event data for the alignment change.
Applies the new tab-text orientation to the strip and recalculates layout.
protected virtual void OnTabStripTextOrientationChanged(EventArgs e)
Event data for the orientation change.
Recalculates layout after the control's theme changes.
protected override void OnThemeChanged()
Overrides:
Requests selection of the panel at the specified index. The return value reflects whether SelectedIndex equals the requested index after the change event runs.
public bool SelectTab(int index)
The zero-based index of the panel to select.
Returns:false when the pending change is canceled; otherwise, whether the stored selected index equals index.
index is negative.
An index greater than or equal to TabPanels.Count is not rejected; it can be stored while leaving no panel selected.
Requests selection of a panel by its name, using a case-insensitive lookup.
Requests selection of the specified panel.
public bool SelectTab(TabPanel tabPanel)
The panel to select.
Returns:true if the requested index is stored after the change event runs; otherwise, false.
Exceptions: ArgumentNullExceptiontabPanel is null.
tabPanel is not in TabPanels.
Returns the base control description with the panel count and, when present, the first panel's description.
public override string ToString()
A diagnostic string for this tab-strip panel.
Overrides:
Sizes the selected panel to TabPanelBounds or updates strip visibility when no panel is selected.
protected virtual void UpdateActivePanelBounds()
Callback to notify the panel that a control has been successfully removed, tab strip has been updated and any additional update is allowed.
Forces layout update by explicitly re-setting the current bounds and performing a layout pass.
protected virtual void UpdateLayout()
Synchronizes the selected tab item and panel visibility with SelectedIndex, optionally moving focus into the selected panel.
Events
Occurs after a selected-index change is applied while the control handle is created.
public event EventHandler SelectedIndexChanged
Occurs before the selected panel index changes; set Cancel to reject the change.
public event TabStripPanelSelectedIndexChangingEventHandler SelectedIndexChanging