WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TreeNodesFlattenedList

    Show / Hide Table of Contents

    Class TreeNodesFlattenedList

    TreeNodesFlattenedList provides flattened representations of the hierarchy of nodes in a TreeModel. The flattened list can be accessed through the VisibleNodes property and each visible node is mapped to a row index and vice versa. TreeNodesFlattenedList also implements ILineSizeHost and the VirtualTreeView assigns it to RowHeightsProvider in order to be able to pixel scroll through visible and expanded nodes.

    Each node can have a unique height but a default height for all nodes can be set with the DefaultHeight property. Each node also maintains its expansion state and when collapsing, expanding a grand parent node all expansion state of child elements are remembered.

    Inheritance
    System.Object
    TreeNodesFlattenedList
    Implements
    ILineSizeHost
    System.IDisposable
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Controls.VirtualTreeView
    Assembly: Syncfusion.GridCommon.Wpf.dll
    Syntax
    public class TreeNodesFlattenedList : ILineSizeHost, IDisposable

    Constructors

    TreeNodesFlattenedList(TreeModel)

    Initializes a new instance of the TreeNodesFlattenedList class.

    Declaration
    public TreeNodesFlattenedList(TreeModel treeModel)
    Parameters
    Type Name Description
    TreeModel treeModel

    The tree model.

    Properties

    Count

    Gets the number of visible rows.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    System.Int32

    The count.

    Item[Int32]

    Gets the TreeNode at the specified index.

    Declaration
    public TreeNode this[int index] { get; set; }
    Parameters
    Type Name Description
    System.Int32 index
    Property Value
    Type Description
    TreeNode

    TotalHeight

    Gets the total height of all visible tree nodes.

    Declaration
    public double TotalHeight { get; }
    Property Value
    Type Description
    System.Double

    The total height.

    Methods

    Contains(TreeNode)

    Determines whether the list contains the specified node.

    Declaration
    public bool Contains(TreeNode item)
    Parameters
    Type Name Description
    TreeNode item

    The node.

    Returns
    Type Description
    System.Boolean

    true if the list contains the specified node; otherwise, false.

    Dispose()

    Declaration
    public void Dispose()

    GetCumulatedHeight(TreeNode)

    Gets the cumulated height of the node. The root node will return 0.

    Declaration
    public double GetCumulatedHeight(TreeNode item)
    Parameters
    Type Name Description
    TreeNode item

    The nodex.

    Returns
    Type Description
    System.Double

    GetCumulatedHeight(Int32)

    Gets the cumulated height of the node. The root node will return 0.

    Declaration
    public double GetCumulatedHeight(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The row index of the node.

    Returns
    Type Description
    System.Double

    GetNextVisibleNode(TreeNode)

    Gets the next visible node.

    Declaration
    public TreeNode GetNextVisibleNode(TreeNode item)
    Parameters
    Type Name Description
    TreeNode item

    The node.

    Returns
    Type Description
    TreeNode

    GetNextVisibleNode(Int32)

    Gets the next visible node.

    Declaration
    public TreeNode GetNextVisibleNode(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The row index of the node.

    Returns
    Type Description
    TreeNode

    GetTreeTreeNodeAtCumulatedHeight(Double)

    Gets the tree node at the specified cumulated height.

    Declaration
    public TreeNode GetTreeTreeNodeAtCumulatedHeight(double height)
    Parameters
    Type Name Description
    System.Double height

    The height. The root node is at height 0.

    Returns
    Type Description
    TreeNode

    IndexOf(TreeNode)

    Returns the row index for a visible node.

    Declaration
    public int IndexOf(TreeNode item)
    Parameters
    Type Name Description
    TreeNode item

    The node.

    Returns
    Type Description
    System.Int32

    Events

    DefaultLineSizeChanged

    Occurs when the default line size changed.

    Declaration
    public event DefaultLineSizeChangedEventHandler DefaultLineSizeChanged
    Event Type
    Type Description
    DefaultLineSizeChangedEventHandler

    FooterLineCountChanged

    Occurs when the footer line count was changed.

    Declaration
    public event EventHandler FooterLineCountChanged
    Event Type
    Type Description
    System.EventHandler

    HeaderLineCountChanged

    Occurs when the header line count was changed.

    Declaration
    public event EventHandler HeaderLineCountChanged
    Event Type
    Type Description
    System.EventHandler

    LineCountChanged

    Occurs when the line count was changed.

    Declaration
    public event EventHandler LineCountChanged
    Event Type
    Type Description
    System.EventHandler

    LineHiddenChanged

    Occurs when a lines hidden state changed.

    Declaration
    public event HiddenRangeChangedEventHandler LineHiddenChanged
    Event Type
    Type Description
    HiddenRangeChangedEventHandler

    LinesInserted

    Occurs when lines were inserted.

    Declaration
    public event LinesInsertedEventHandler LinesInserted
    Event Type
    Type Description
    LinesInsertedEventHandler

    LineSizeChanged

    Occurs when a lines size was changed.

    Declaration
    public event RangeChangedEventHandler LineSizeChanged
    Event Type
    Type Description
    RangeChangedEventHandler

    LinesRemoved

    Occurs when lines were removed.

    Declaration
    public event LinesRemovedEventHandler LinesRemoved
    Event Type
    Type Description
    LinesRemovedEventHandler

    Explicit Interface Implementations

    ILineSizeHost.GetDefaultLineSize()

    Declaration
    double ILineSizeHost.GetDefaultLineSize()
    Returns
    Type Description
    System.Double

    ILineSizeHost.GetFooterLineCount()

    Declaration
    int ILineSizeHost.GetFooterLineCount()
    Returns
    Type Description
    System.Int32

    ILineSizeHost.GetHeaderLineCount()

    Declaration
    int ILineSizeHost.GetHeaderLineCount()
    Returns
    Type Description
    System.Int32

    ILineSizeHost.GetHidden(Int32, out Int32)

    Declaration
    bool ILineSizeHost.GetHidden(int index, out int repeatValueCount)
    Parameters
    Type Name Description
    System.Int32 index
    System.Int32 repeatValueCount
    Returns
    Type Description
    System.Boolean

    ILineSizeHost.GetLineCount()

    Declaration
    int ILineSizeHost.GetLineCount()
    Returns
    Type Description
    System.Int32

    ILineSizeHost.GetSize(Int32, out Int32)

    Declaration
    double ILineSizeHost.GetSize(int index, out int repeatValueCount)
    Parameters
    Type Name Description
    System.Int32 index
    System.Int32 repeatValueCount
    Returns
    Type Description
    System.Double

    ILineSizeHost.InitializeScrollAxis(ScrollAxisBase)

    Declaration
    void ILineSizeHost.InitializeScrollAxis(ScrollAxisBase scrollAxis)
    Parameters
    Type Name Description
    ScrollAxisBase scrollAxis

    Implements

    ILineSizeHost
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved