void RowDef_RowCollapsing(RowDef row) { foreach (RowDef child in row.Children) { if (row.IsExpanded.HasValue && row.IsExpanded.Value) RowDef_RowCollapsing(child); child.IsVisible = false; } OnPropertyChanged("Display"); }
IEnumerable<RowDef> IterateTree(RowDef parent) { if (!parent.IsVisible) yield break; yield return parent; foreach (RowDef child in parent.Children) { foreach (RowDef r in IterateTree(child)) { yield return r; } } }
public RowDef(RowDef parent) : this() { Parent = parent; }
void RowDef_RowExpanding(RowDef row) { foreach (RowDef child in row.Children) child.IsVisible = true; OnPropertyChanged("Display"); }