/// <summary>Validates the treemap item.</summary> public void Validate() { children.Sort((a, b) => b.Size.CompareTo(a.Size)); int count = ChildCount; for (int i = 0; i < count; i++) { PreviewTreemapItem child = children[i]; if (child.ChildCount != 0) { child.Validate(); } } }
/// <summary>Adds a <see cref="PreviewTreemapItem"/> to the children.</summary> /// /// <param name="child">The child treemap item to add.</param> public void Add(PreviewTreemapItem child) { children.Add(child); }