Class TreeLevels
A collection of TreeLevel objects.
Inheritance
Implements
Namespace: Syncfusion.Windows.Controls.VirtualTreeView
Assembly: Syncfusion.GridCommon.WPF.dll
Syntax
public class TreeLevels : Object, IList<TreeLevel>, ICollection<TreeLevel>, IEnumerable<TreeLevel>, IEnumerable
Constructors
TreeLevels(TreeModel)
Initializes a new instance of the TreeLevels class.
Declaration
public TreeLevels(TreeModel treeModel)
Parameters
Type | Name | Description |
---|---|---|
TreeModel | treeModel | The tree model. |
Properties
Count
Gets the number of elements contained in the collection.
Declaration
public int Count { get; }
Property Value
Type |
---|
System.Int32 |
IsReadOnly
Gets a value indicating whether the collection is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
Type |
---|
System.Boolean |
Item[Int32]
Gets or sets the TreeLevel at the specified index.
Declaration
public TreeLevel this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type |
---|
TreeLevel |
TreeModel
Gets or sets the tree model.
Declaration
public TreeModel TreeModel { get; }
Property Value
Type | Description |
---|---|
TreeModel | The tree model. |
Methods
Add(TreeLevel)
Adds an item to the collection.
Declaration
public void Add(TreeLevel item)
Parameters
Type | Name | Description |
---|---|---|
TreeLevel | item | The object to add to the collection. |
Clear()
Removes all items from the collection.
Declaration
public void Clear()
Contains(TreeLevel)
Determines whether the collection contains a specific value.
Declaration
public bool Contains(TreeLevel item)
Parameters
Type | Name | Description |
---|---|---|
TreeLevel | item | The object to locate in the collection. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
CopyTo(TreeLevel[], Int32)
Copies the elements of the collection to an System.Array, starting at a particular System.Array index.
Declaration
public void CopyTo(TreeLevel[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
TreeLevel[] | array | The one-dimensional System.Array that is the destination of the elements copied from collection. The System.Array must have zero-based indexing. |
System.Int32 | arrayIndex | The zero-based index in |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentOutOfRangeException |
|
System.ArgumentException |
|
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<TreeLevel> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<TreeLevel> | An enumerator that can be used to iterate through the collection. |
IndexOf(TreeLevel)
Determines the index of a specific item in the collection.
Declaration
public int IndexOf(TreeLevel item)
Parameters
Type | Name | Description |
---|---|---|
TreeLevel | item | The object to locate in the collection. |
Returns
Type | Description |
---|---|
System.Int32 | The index of |
Insert(Int32, TreeLevel)
Inserts an item to the collection at the specified index.
Declaration
public void Insert(int index, TreeLevel item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which |
TreeLevel | item | The object to insert into the collection. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException |
|
Remove(TreeLevel)
Removes the first occurrence of a specific object from the collection.
Declaration
public bool Remove(TreeLevel item)
Parameters
Type | Name | Description |
---|---|---|
TreeLevel | item | The object to remove from the collection. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
RemoveAt(Int32)
Removes the collection item at the specified index.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the item to remove. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException |
|