New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Represents a collection of SplitterItem objects in a RadSplitter control.

The SplitterItemsCollection class represents a collection of SplitterItem objects. The SplitterItem objects in turn represent panes items within a RadSplitter control.

  • Use the this[int] to programmatically retrieve a single SplitterItem from the collection, using array notation.
  • Use the Count property to determine the total number of panes in the collection.
  • Use the Add(Control) method to add panes in the collection.
  • Use the Remove(Control) method to remove panes from the collection.

Definition

Constructors

Initializes a new instance of the SplitterItemsCollection class.

C#
public SplitterItemsCollection(SplitterItemsContainer container)
Parameters:containerSplitterItemsContainer

The container of the collection.

Use the constructor to create a new SplitterItemsCollection class.

Properties

Gets a SplitterItem at the specified index in the collection.

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

The zero-based index of the SplitterItem to retrieve from the collection.

Use this indexer to get a SplitterItem from the collection at the specified index, using array notation.

Methods

Appends a SplitterItem to the end of the collection.

C#
public void Add(SplitterItem item)
Parameters:itemSplitterItem
Example:
cs-api-definition
RadPane pane = new RadPane();

RadMenu1.Panes.Add(pane);
C#
public void AddAt(int index, SplitterItem item, bool regenerateIndexes)
Parameters:indexintitemSplitterItemregenerateIndexesbool
C#
public void AddAt(int index, SplitterItem item)
Parameters:indexintitemSplitterItem

Removes all items from the collection.

C#
public void Clear()

Use the Clear method to remove all items from the collection. The Count property is set to 0.

Determines whether the collection contains the specified item.

C#
public bool Contains(SplitterItem item)
Parameters:itemSplitterItem

A SplitterItem to search for in the collection.

Returns:

bool

true if the collection contains the specified item; otherwise, false.

Use the Contains method to determine whether the SplitterItem specified by the item parameter is in the collection.

Determines the index value that represents the position of the specified item in the collection.

C#
public int IndexOf(SplitterItem item)
Parameters:itemSplitterItem

A SplitterItem to search for in the collection.

Returns:

int

The zero-based index position of the specified SplitterItem in the collection.

Use the IndexOf method to determine the index value of the SplitterItem specified by the item parameter in the collection. If an item with this criteria is not found in the collection, -1 is returned.

Inserts the specified SplitterItem in the collection at the specified index location.

C#
public void Insert(int index, SplitterItem item)
Parameters:indexint

The location in the collection to insert the SplitterItem.

itemSplitterItem

The SplitterItem to add to the collection.

Use the Insert method to add a SplitterItem to the collection at the index specified by the index parameter.

Removes the specified item from the collection.

C#
public void Remove(SplitterItem item)
Parameters:itemSplitterItem

Use the Remove method to remove a SplitterItem from the collection.

Example:
cs-api-definition
RadPane pane = RadSplitter1.GetPaneById("pane1");
if (pane != null)
{
RadSplitter1.Panes.Remove(pane);
}

Removes the SplitterItem at the specified index from the collection.

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

The index of the SplitterItem to remove.

Use the RemoveAt method to remove the SplitterItem at the specified index from the collection.