Expanding and Collapsing Rows
Basic Expand/Collapse Operations
For hierarchical TreeDataGrids, you can programmatically expand or collapse rows:
var Source = new HierarchicalTreeDataGridSource<Person>(_people)
{
Columns = { /* columns */ }
};
// Expand a specific node by index path
Source.Expand(new IndexPath(0)); // Expand first root item
// Collapse a node
Source.Collapse(new IndexPath(0));
信息
For more information about IndexPath
see Selection