All pages
Powered by GitBook
1 of 1

Loading...

TreeNodeCollection

Wisej.Web.TreeNodeCollection

Namespace: Wisej.Web

Assembly: Wisej.Framework (2.2.0.0)

Represents a collection of TreeNode objects.

public class TreeNodeCollection : IList, ICollection, IEnumerable, IList<TreeNode>, ICollection<TreeNode>, IEnumerable<TreeNode>
Public Class TreeNodeCollection
    Inherits IList
    Implements ICollection, IEnumerable, IList(Of TreeNode), ICollection(Of TreeNode), IEnumerable(Of TreeNode)

Properties

Count

: Returns the total number of objects in the collection.

IsReadOnly

: Returns a value indicating whether the collection is read-only.

Item(index)

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

Throws:

  • The being assigned is also a parent causing a circular reference.

  • The value is null.

  • The index value is less than 0 or is greater than the number of tree nodes in the collection.

Item(key)

: Returns the with the specified key from the collection.

Methods

Add(text)

Adds a new tree node with the specified label text to the end of the current .

Parameter
Type
Description

Returns: . A that represents the tree node being added to the collection.

Add(key, text)

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

Parameter
Type
Description

Returns: . The that was added to the collection.

Add(key, text, imageIndex)

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

Parameter
Type
Description

Returns: . The that was added to the collection.

Add(key, text, imageKey)

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

Parameter
Type
Description

Returns: . The that was added to the collection.

Add(key, text, imageIndex, selectedImageIndex)

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

Parameter
Type
Description

Returns: . The tree node that was added to the collection.

Add(key, text, imageKey, selectedImageKey)

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

Parameter
Type
Description

Returns: . The that was added to the collection.

Add(node)

Adds a previously created to the end of the .

Parameter
Type
Description

Returns: . The zero-based index value of the added to the .

Throws:

  • node is null.

  • The node is currently assigned to another or it is a parent node causing a circular reference.

AddRange(nodes)

Adds an array of previously created objects to the collection.

Parameter
Type
Description

Throws:

  • nodes is null or one of the items in the collection is null.

  • nodes is the child of another .

Clear()

Removes all tree nodes from the collection.

Clear(dispose)

Removes and disposes all tree nodes from the collection.

Parameter
Type
Description

Contains(node)

Determines whether the specified is a member of the collection.

Parameter
Type
Description

Returns: . true if the is a member of the collection; otherwise, false.

ContainsKey(key)

Determines whether the collection contains a with the specified key.

Parameter
Type
Description

Returns: . true to indicate the collection contains a with the specified key; otherwise, false.

CopyTo(dest, index)

Copies the entire collection into an existing array at a specified location within the array.

Parameter
Type
Description

Find(key, searchAllChildren)

Finds the objects with specified key, optionally searching sub nodes.

Parameter
Type
Description

Returns: . An array of objects whose property matches the specified key.

GetEnumerator()

Returns an enumerator that can be used to iterate through the .

Returns: . An that represents the .

IndexOf(node)

Returns the index of the specified in the collection.

Parameter
Type
Description

Returns: . The zero-based index of the item found in the tree node collection; otherwise, -1.

IndexOfKey(key)

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

Parameter
Type
Description

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

Insert(index, node)

Inserts an existing tree node into the tree node collection at the specified location.

Parameter
Type
Description

Throws:

  • node is null.

  • The node is currently assigned to another or it is a parent node causing a circular reference.

Insert(index, text)

Creates a with the specified text and inserts it at the specified index.

Parameter
Type
Description

Returns: . The that was inserted in the collection.

Insert(index, key, text)

Creates a tree node with the specified text and key, and inserts it into the collection.

Parameter
Type
Description

Returns: . The that was inserted in the collection.

Insert(index, key, text, imageIndex)

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

Parameter
Type
Description

Returns: . The that was inserted in the collection.

Insert(index, key, text, imageKey)

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

Parameter
Type
Description

Returns: . The that was inserted in the collection.

Insert(index, key, text, imageIndex, selectedImageIndex)

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

Parameter
Type
Description

Returns: . The that was inserted in the collection.

Insert(index, key, text, imageKey, selectedImageKey)

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

Parameter
Type
Description

Returns: . The that was inserted in the collection.

Remove(node)

Removes the specified from the .

Parameter
Type
Description

Throws:

  • node is null.

RemoveAt(index)

Removes a tree node from the tree node collection at a specified index.

Parameter
Type
Description

RemoveByKey(key)

Removes the with the specified key from the collection.

Parameter
Type
Description

Events

CollectionChanged

Fired when the collection changes.

The index of the image to be displayed in the tree node when it is in a selected state.

The key of the image to display when the node is in a selected state.

The index of the image to display in the .

The key of the image to display in the .

The index of the image to display in the .

selectedImageIndex

The index of the image to display in the when it is in a selected state.

The key of the image to display in the .

selectedImageKey

The key of the image to display in the when it is in a selected state.

text

String

The label text displayed by the TreeNode.

key

String

The name of the TreeNode.

text

String

The text to display in the TreeNode.

key

String

The name of the TreeNode.

text

String

The text to display in the TreeNode.

imageIndex

Int32

The index of the image to display in the TreeNode.

key

String

The name of the TreeNode.

text

String

The text to display in the TreeNode.

imageKey

String

The image to display in the TreeNode.

key

String

The name of the TreeNode.

text

String

The text to display in the TreeNode.

imageIndex

Int32

The index of the image to display in the TreeNode.

key

String

The name of the TreeNode.

text

String

The text to display in the TreeNode.

imageKey

String

The key of the image to display in the TreeNode.

node

TreeNode

The TreeNode to add to the collection.

nodes

TreeNode[]

An array of TreeNode objects representing the tree nodes to add to the collection.

dispose

Boolean

Indicates whether to dispose the tree nodes removed from the collection.

node

TreeNode

The TreeNode to locate in the collection.

key

String

The name of the TreeNode to search for.

dest

Array

The destination array.

index

Int32

The index in the destination array at which storing begins.

key

String

The name of the tree node to search for.

searchAllChildren

Boolean

true to search child nodes of tree nodes; otherwise, false.

node

TreeNode

The TreeNode to locate in the collection.

key

String

The name of the tree node to search for.

index

Int32

The indexed location within the collection to insert the TreeNode.

node

TreeNode

The TreeNode to insert into the collection.

index

Int32

The location within the collection to insert the TreeNode.

text

String

The text to display in the TreeNode.

index

Int32

The location within the collection to insert the TreeNode.

key

String

The name of the TreeNode.

text

String

The text to display in the TreeNode.

index

Int32

The location within the collection to insert the TreeNode.

key

String

The name of the TreeNode.

text

String

The text to display in the TreeNode.

index

Int32

The location within the collection to insert the TreeNode.

key

String

The name of the TreeNode.

text

String

The text to display in the TreeNode.

index

Int32

The location within the collection to insert the TreeNode.

key

String

The name of the TreeNode.

text

String

The text to display in the TreeNode.

index

Int32

The location within the collection to insert the TreeNode.

key

String

The name of the TreeNode.

text

String

The text to display in the TreeNode.

node

TreeNode

The TreeNode to remove.

index

Int32

The index of the TreeNode to remove.

key

String

The name of the tree node to remove from the collection.

Int32
TreeNode
Boolean
TreeNode
TreeNode
ArgumentException
TreeNode
ArgumentNullException
ArgumentOutOfRangeException
TreeNode
TreeNode
TreeNodeCollection
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNodeCollection
Int32
TreeNode
TreeNodeCollection
ArgumentNullException
ArgumentException
TreeView
TreeNode
ArgumentNullException
ArgumentException
TreeView
TreeNode
Boolean
TreeNode
TreeNode
Boolean
TreeNode
TreeNode
TreeNode[]
TreeNode
Name
TreeNodeCollection
IEnumerator<TreeNode>
IEnumerator
TreeNodeCollection
TreeNode
Int32
TreeNode
Int32
ArgumentNullException
ArgumentException
TreeView
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNode
TreeNodeCollection
ArgumentNullException
TreeNode
CollectionChangeEventHandler

selectedImageIndex

selectedImageKey

imageIndex

imageKey

imageIndex

imageKey

Int32
String
Int32
TreeNode
String
TreeNode
Int32
TreeNode
Int32
TreeNode
String
TreeNode
String
TreeNode