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

Provides ordered access to the child panels owned by a RadSplitContainer.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class SplitPanelCollection : IList, ICollection, IEnumerable

Inheritance: objectSplitPanelCollection

Implements: ICollectionIEnumerableIList

Constructors

Creates a collection backed by the specified split container's child controls.

C#
public SplitPanelCollection(RadSplitContainer owner)
Parameters:ownerRadSplitContainer

The container whose child panels are exposed.

Properties

Gets the number of child controls currently owned by the container.

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 or replaces the panel at the specified position. Setting removes the existing control, adds the new panel, and restores it to the requested child index.

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

The zero-based position of the panel.

Gets the panel whose Name matches the specified key, using a case-insensitive comparison. Returns null when the key is empty or no panel matches.

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

The panel name to find.

Methods

Adds a panel to the end of the owning container's child-control collection.

C#
public void Add(SplitPanel value)
Parameters:valueSplitPanel

The panel to add.

Exceptions: ArgumentNullException

value is null.

Adds each panel from the sequence to the end of the owning container's child-control collection.

C#
public void AddRange(IEnumerable<SplitPanel> splitPanels)
Parameters:splitPanelsIEnumerable<SplitPanel>

The panels to add.

Exceptions: ArgumentNullException

splitPanels is null.

Removes all child controls from the owning container.

C#
public void Clear()

Implements: IList.Clear()

Determines whether the specified panel instance is in this collection.

C#
public bool Contains(SplitPanel spliPanel)
Parameters:spliPanelSplitPanel

The panel to locate.

Returns:

bool

true when the panel is present.

Exceptions: ArgumentNullException

spliPanel is null.

Determines whether a panel with the specified name is present, using a case-insensitive comparison.

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

The panel name to locate.

Returns:

bool

true when a panel with that name is present.

Finds the position of the specified panel instance.

C#
public int IndexOf(SplitPanel splitPanel)
Parameters:splitPanelSplitPanel

The panel to find.

Returns:

int

The zero-based position, or -1 when the panel is not in this collection.

Exceptions: ArgumentNullException

splitPanel is null.

Finds the position of 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.

Adds the specified panel to the owner and moves it to the requested position.

C#
public void Insert(int index, SplitPanel splitPanel)
Parameters:indexint

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

splitPanelSplitPanel

The panel to insert.

Creates a panel with the specified name and text, then inserts 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.

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.

Removes the specified panel from the owner. A non-null argument returns true even if it was not present.

C#
public bool Remove(SplitPanel value)
Parameters:valueSplitPanel

The panel to remove.

Returns:

bool

false when value is null; otherwise, true.

Removes the panel at the specified position from the owner.

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.