New to Telerik UI for WinForms? Start a free 30-day trial

Provides ordered access to the TabPanel controls owned by a TabStripPanel.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class TabPanelCollection : IList, ICollection, IEnumerable

Inheritance: objectTabPanelCollection

Implements: ICollectionIEnumerableIList

Constructors

Creates a collection backed by the specified tab-strip panel's child controls.

C#
public TabPanelCollection(TabStripPanel owner)
Parameters:ownerTabStripPanel

The tab-strip panel that owns the collection.

Exceptions: ArgumentNullException

owner is null.

Properties

Gets the number of child controls owned by the tab strip.

C#
public int Count { get; }

Implements: ICollection.Count

Gets whether the collection is read-only; this collection allows changes.

C#
public bool IsReadOnly { get; }

Implements: IList.IsReadOnly

Gets the panel at the specified position in the owning tab strip.

C#
public virtual TabPanel this[int index] { get; }
Parameters:indexint

The zero-based position of the panel.

Gets the panel with the specified name, using a case-insensitive lookup, or null when no panel matches.

C#
public virtual TabPanel this[string key] { get; }
Parameters:keystring

The panel name to find.

Methods

Creates a panel with the specified name and text, then adds it to the end of the collection. The image index is not applied.

C#
public void Add(string key, string text, int imageIndex)
Parameters:keystring

The name assigned to the new panel.

textstring

The text assigned to the new panel.

imageIndexint

An image index accepted by the overload but not used.

Creates a panel with the specified name and text, then adds it to the end of the collection. The image key is not applied.

C#
public void Add(string key, string text, string imageKey)
Parameters:keystring

The name assigned to the new panel.

textstring

The text assigned to the new panel.

imageKeystring

An image key accepted by the overload but not used.

Creates a panel with the specified name and text, then adds it to the end of the collection.

C#
public void Add(string key, string text)
Parameters:keystring

The name assigned to the new panel.

textstring

The text assigned to the new panel.

Creates a tab panel with the specified text and adds it to the end of the collection.

C#
public void Add(string text)
Parameters:textstring

The text assigned to the new panel.

Adds the panel to the end of the owning tab strip's child-control collection.

C#
public void Add(TabPanel value)
Parameters:valueTabPanel

The panel to add.

Exceptions: ArgumentNullException

value is null.

Adds each panel in the array to the end of the collection, preserving array order.

C#
public void AddRange(TabPanel[] panels)
Parameters:panelsTabPanel[]

The panels to add.

Exceptions: ArgumentNullException

panels is null or contains a null panel.

Removes all child controls from the owning tab strip.

C#
public void Clear()

Implements: IList.Clear()

Determines whether this collection contains the specified panel instance.

C#
public bool Contains(TabPanel panel)
Parameters:panelTabPanel

The panel to locate.

Returns:

bool

true when the panel is present.

Exceptions: ArgumentNullException

panel is null.

Determines whether a panel with the specified name exists; name comparison is case-insensitive.

C#
public virtual bool ContainsKey(string key)
Parameters:keystring

The panel name to find.

Returns:

bool

true when a matching panel exists.

Enumerates the tab panels in the owning strip's child-control order.

C#
public IEnumerator GetEnumerator()
Returns:

IEnumerator

An enumerator over the tab panels.

Implements: IEnumerable.GetEnumerator()

Finds the position of the specified panel instance.

C#
public int IndexOf(TabPanel panel)
Parameters:panelTabPanel

The panel to find.

Returns:

int

The zero-based position, or -1 when the panel is not present.

Exceptions: ArgumentNullException

panel is null.

Finds a panel by its name using a case-insensitive comparison.

C#
public virtual int IndexOfKey(string key)
Parameters:keystring

The panel name to find.

Returns:

int

The zero-based position, or -1 when the key is empty or no panel matches.

Creates a named panel with the specified text, then inserts and selects it. The image index is not applied.

C#
public void Insert(int index, string key, string text, int imageIndex)
Parameters:indexint

The zero-based position at which to insert the panel.

keystring

The name assigned to the new panel.

textstring

The text assigned to the new panel.

imageIndexint

An image index accepted by the overload but not used.

Creates a named panel with the specified text, then inserts and selects it. The image key is not applied.

C#
public void Insert(int index, string key, string text, string imageKey)
Parameters:indexint

The zero-based position at which to insert the panel.

keystring

The name assigned to the new panel.

textstring

The text assigned to the new panel.

imageKeystring

An image key accepted by the overload but not used.

Creates a panel with the specified name and text, then inserts and selects it at the requested position.

C#
public void Insert(int index, string key, string text)
Parameters:indexint

The zero-based position at which to insert the panel.

keystring

The name assigned to the new panel.

textstring

The text assigned to the new panel.

Creates a panel with the specified text and inserts it at the requested position, selecting it.

C#
public void Insert(int index, string text)
Parameters:indexint

The zero-based position at which to insert the panel.

textstring

The text assigned to the new panel.

Inserts the panel at the requested position and makes it the selected panel.

C#
public void Insert(int index, TabPanel tabPanel)
Parameters:indexint

The zero-based position at which to insert the panel.

tabPanelTabPanel

The panel to insert.

Removes the panel from the owning tab strip.

C#
public void Remove(TabPanel value)
Parameters:valueTabPanel

The panel to remove.

Exceptions: ArgumentNullException

value is null.

Removes the panel at the specified position from the owning tab strip.

C#
public void RemoveAt(int index)
Parameters:indexint

The zero-based position of the panel to remove.

Implements: IList.RemoveAt(int)

Removes the panel with the specified name, using a case-insensitive lookup; does nothing when no panel matches.

C#
public virtual void RemoveByKey(string key)
Parameters:keystring

The name of the panel to remove.