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
Inherited Members
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 |
---|
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 |
|
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 |
---|
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 |
---|
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 |
---|
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 |
---|
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 |
---|
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 |
---|
System.Int32 |
Events
DefaultLineSizeChanged
Occurs when the default line size changed.
Declaration
public event DefaultLineSizeChangedEventHandler DefaultLineSizeChanged
Event Type
FooterLineCountChanged
Occurs when the footer line count was changed.
Declaration
public event EventHandler FooterLineCountChanged
Event Type
Type |
---|
System.EventHandler |
HeaderLineCountChanged
Occurs when the header line count was changed.
Declaration
public event EventHandler HeaderLineCountChanged
Event Type
Type |
---|
System.EventHandler |
LineCountChanged
Occurs when the line count was changed.
Declaration
public event EventHandler LineCountChanged
Event Type
Type |
---|
System.EventHandler |
LineHiddenChanged
Occurs when a lines hidden state changed.
Declaration
public event HiddenRangeChangedEventHandler LineHiddenChanged
Event Type
LinesInserted
Occurs when lines were inserted.
Declaration
public event LinesInsertedEventHandler LinesInserted
Event Type
LineSizeChanged
Occurs when a lines size was changed.
Declaration
public event RangeChangedEventHandler LineSizeChanged
Event Type
LinesRemoved
Occurs when lines were removed.
Declaration
public event LinesRemovedEventHandler LinesRemoved
Event Type
Explicit Interface Implementations
ILineSizeHost.GetDefaultLineSize()
Declaration
double ILineSizeHost.GetDefaultLineSize()
Returns
Type |
---|
System.Double |
ILineSizeHost.GetFooterLineCount()
Declaration
int ILineSizeHost.GetFooterLineCount()
Returns
Type |
---|
System.Int32 |
ILineSizeHost.GetHeaderLineCount()
Declaration
int ILineSizeHost.GetHeaderLineCount()
Returns
Type |
---|
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 |
---|
System.Boolean |
ILineSizeHost.GetLineCount()
Declaration
int ILineSizeHost.GetLineCount()
Returns
Type |
---|
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 |
---|
System.Double |
ILineSizeHost.InitializeScrollAxis(ScrollAxisBase)
Declaration
void ILineSizeHost.InitializeScrollAxis(ScrollAxisBase scrollAxis)
Parameters
Type | Name | Description |
---|---|---|
ScrollAxisBase | scrollAxis |