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
System.IDisposable
Assembly: Syncfusion.GridCommon.WPF.dll
Syntax
public class TreeNodesFlattenedList : Object, ILineSizeHost, IDisposable
Constructors
TreeNodesFlattenedList(TreeModel)
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
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
Declaration
public void add_DefaultLineSizeChanged(DefaultLineSizeChangedEventHandler value)
Parameters
Declaration
public void add_LineHiddenChanged(HiddenRangeChangedEventHandler value)
Parameters
Declaration
public void add_LinesInserted(LinesInsertedEventHandler value)
Parameters
Declaration
public void add_LineSizeChanged(RangeChangedEventHandler value)
Parameters
Declaration
public void add_LinesRemoved(LinesRemovedEventHandler value)
Parameters
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
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
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
GetNextVisibleNode(TreeNode)
Gets the next visible node.
Declaration
public TreeNode GetNextVisibleNode(TreeNode item)
Parameters
Type |
Name |
Description |
TreeNode |
item |
The node.
|
Returns
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
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
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
Declaration
public void remove_DefaultLineSizeChanged(DefaultLineSizeChangedEventHandler value)
Parameters
Declaration
public void remove_LineHiddenChanged(HiddenRangeChangedEventHandler value)
Parameters
Declaration
public void remove_LinesInserted(LinesInsertedEventHandler value)
Parameters
Declaration
public void remove_LineSizeChanged(RangeChangedEventHandler value)
Parameters
Declaration
public void remove_LinesRemoved(LinesRemovedEventHandler value)
Parameters
Events
DefaultLineSizeChanged
Occurs when the default line size changed.
Declaration
public event DefaultLineSizeChangedEventHandler DefaultLineSizeChanged
Event Type
Occurs when the footer line count was changed.
Declaration
public event EventHandler FooterLineCountChanged
Event Type
Occurs when the header line count was changed.
Declaration
public event EventHandler HeaderLineCountChanged
Event Type
LineCountChanged
Occurs when the line count was changed.
Declaration
public event EventHandler LineCountChanged
Event Type
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
Declaration
double ILineSizeHost.GetDefaultLineSize()
Returns
Declaration
int ILineSizeHost.GetFooterLineCount()
Returns
Declaration
int ILineSizeHost.GetHeaderLineCount()
Returns
Declaration
bool ILineSizeHost.GetHidden(int index, out int repeatValueCount)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
System.Int32 |
repeatValueCount |
|
Returns
Declaration
int ILineSizeHost.GetLineCount()
Returns
Declaration
double ILineSizeHost.GetSize(int index, out int repeatValueCount)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
System.Int32 |
repeatValueCount |
|
Returns
Declaration
void ILineSizeHost.InitializeScrollAxis(ScrollAxisBase scrollAxis)
Parameters
Implements
System.IDisposable