public void Layout(HierarchicalData root, double actualWidth, double actualHeight) { // actualWidth and actualHeight are not used. We render the circles independent of the sizes and scale them later. // Counters over all steps DebugHelper.ResetDbgCounter(); // Cleanup previous layouting root.TraverseTopDown(x => x.Layout = null); Layout(root); // Center root node to screen. Move to (0,0) var rootLayout = GetLayout(root); MoveCircles(root, -(Vector)rootLayout.Center); ApplyPendingMovements(root); }