Accordion.PanelCollection

Wisej.Web.Accordion PanelCollection

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.0.0.0)

Contains a collection of AccordionPanel objects.

public class PanelCollection : IList, ICollection, IEnumerable, IList<AccordionPanel>, ICollection<AccordionPanel>, IEnumerable<AccordionPanel>

Properties

Count

Int32: Returns the number of panels in the collection.

Item(index)

AccordionPanel: Returns or sets a AccordionPanel in the collection at the specified index.

Throws:

Item(name)

AccordionPanel: Returns the AccordionPanel with the specified key from the collection.

Methods

Add(panel)

Adds a AccordionPanel to the collection.

Parameter
Type
Description

Throws:

Add(text)

Creates a AccordionPanel with the specified text, and adds it to the collection.

Parameter
Type
Description

text

The text to display on the panel.

Add(key, text)

Creates a AccordionPanel with the specified key and text and adds it to the collection.

Parameter
Type
Description

key

The name of the AccordionPanel.

text

The text to display on the title of AccordionPanel.

Add(key, text, imageIndex)

Creates a AccordionPanel with the specified key, text, and image, and adds it to the collection.

Parameter
Type
Description

key

The name of the AccordionPanel.

text

The text to display on the AccordionPanel.

imageIndex

The index of the image to display on the title of the AccordionPanel.

Add(key, text, imageKey)

Creates a AccordionPanel with the specified key, text, and image, and adds it to the collection.

Parameter
Type
Description

key

The name of the AccordionPanel.

text

The text to display on the AccordionPanel.

imageKey

The key of the image to display on the title of the AccordionPanel.

AddRange(panels)

Adds a set of AccordionPanel panels to the collection.

Parameter
Type
Description

panels

An array of type AccordionPanel that contains the panels to add.

Throws:

Clear()

Removes all the AccordionPanel panels from the collection.

Clear(dispose)

Removes and disposes all AccordionPanel panels from the collection.

Parameter
Type
Description

dispose

Indicates whether to dispose the AccordionPanel panels removed from the collection.

Contains(panel)

Determines whether a specified AccordionPanel is in the collection.

Parameter
Type
Description

panel

The AccordionPanel to locate in the collection.

Returns: Boolean. true if the specified AccordionPanel is in the collection; otherwise, false.

Throws:

ContainsKey(key)

Determines whether the collection contains a AccordionPanel with the specified key.

Parameter
Type
Description

key

The name of the AccordionPanel to search for.

Returns: Boolean. true to indicate a AccordionPanel with the specified key was found in the collection; otherwise, false.

CopyTo(array, index)

Copies the AccordionPanel panels in the collection to the specified array, starting at the specified index.

Parameter
Type
Description

array

The one-dimensional array that is the destination of the AccordionPanel panels copied from the collection. The array must have zero-based indexing.

index

The zero-based index in the array at which copying begins.

Throws:

IndexOf(panel)

Returns the index of the AccordionPanel in the collection.

Parameter
Type
Description

panel

The AccordionPanel to locate in the collection.

Returns: Int32. The zero-based index of the panel; -1 if it cannot be found.

Throws:

IndexOfKey(key)

Returns the index of the first occurrence of the AccordionPanel with the specified key.

Parameter
Type
Description

key

The name of the AccordionPanel to find in the collection.

Returns: Int32. The zero-based index of the first occurrence of a AccordionPanel with the specified key, if found; otherwise, -1.

Insert(index, panel)

Inserts an existing AccordionPanel into the collection at the specified index.

Parameter
Type
Description

index

The zero-based index location where the AccordionPanel is inserted.

panel

The AccordionPanel to insert in the collection.

Insert(index, text)

Creates a new AccordionPanel with the specified text and inserts it into the collection at the specified index.

Parameter
Type
Description

index

The zero-based index location where the AccordionPanel is inserted.

text

The text to display in the AccordionPanel.

Insert(index, key, text)

Creates a new AccordionPanel with the specified key and text, and inserts it into the collection at the specified index.

Parameter
Type
Description

index

The zero-based index location where the AccordionPanel is inserted.

key

The name of the AccordionPanel.

text

The text to display on the AccordionPanel.

Insert(index, key, text, imageIndex)

Creates a new AccordionPanel with the specified key, text, and image, and inserts it into the collection at the specified index.

Parameter
Type
Description

index

The zero-based index location where the AccordionPanel is inserted

key

The name of the AccordionPanel.

text

The text to display on the AccordionPanel.

imageIndex

The zero-based index of the image to display on the AccordionPanel.

Insert(index, key, text, imageKey)

Creates a AccordionPanel with the specified key, text, and image, and inserts it into the collection at the specified index.

Parameter
Type
Description

index

The zero-based index location where the AccordionPanel is inserted.

key

The name of the AccordionPanel.

text

The text to display on the AccordionPanel.

imageKey

The key of the image to display on the AccordionPanel.

Remove(panel)

Removes the AccordionPanel from the collection.

Parameter
Type
Description

panel

The AccordionPanel to remove.

Throws:

RemoveAt(index)

Removes the AccordionPanel at the specified index from the collection.

Parameter
Type
Description

index

The zero-based index of the AccordionPanel to remove.

RemoveByKey(key)

Removes the AccordionPanel with the specified key from the collection.

Parameter
Type
Description

key

The name of the AccordionPanel to remove.

Last updated

Was this helpful?