menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TreeLevels - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class TreeLevels

    A collection of TreeLevel objects.

    Inheritance
    System.Object
    TreeLevels
    Implements
    System.Collections.Generic.IList<TreeLevel>
    System.Collections.Generic.ICollection<TreeLevel>
    System.Collections.Generic.IEnumerable<TreeLevel>
    System.Collections.IEnumerable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Controls.VirtualTreeView
    Assembly: Syncfusion.GridCommon.WPF.dll
    Syntax
    public class TreeLevels : 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 item is found in the collection; otherwise, false.

    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 array at which copying begins.

    Exceptions
    Type Condition
    System.ArgumentNullException

    array is null.

    System.ArgumentOutOfRangeException

    arrayIndex is less than 0.

    System.ArgumentException

    array is multidimensional.-or-arrayIndex is equal to or greater than the length of array.-or-The number of elements in the source collection is greater than the available space from arrayIndex to the end of the destination array.-or-Type T cannot be cast automatically to the type of the destination array.

    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 item if found in the list; otherwise, -1.

    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 item should be inserted.

    TreeLevel item

    The object to insert into the collection.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    index is not a valid index in the collection.

    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 item was successfully removed from the collection; otherwise, false. This method also returns false if item is not found in the original collection.

    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

    index is not a valid index in the collection.

    Explicit Interface Implementations

    IEnumerable.GetEnumerator()

    Declaration
    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type
    System.Collections.IEnumerator

    Implements

    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable

    Extension Methods

    PivotExtension.GroupByMany<TElement>(IEnumerable<TElement>, Int32, Func<TElement, Object>[])
    PivotExtension.GroupByMany<TElement>(IEnumerable<TElement>, IEnumerable<Func<TElement, Object>>)
    FunctionalExtensions.ForEach<T>(IEnumerable, Action<T>)
    FunctionalExtensions.ForEach<T>(IEnumerable<T>, Action<T>)
    FunctionalExtensions.ToList<T>(IEnumerable)
    ChartExtensionUtils.DistinctBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved