private void drawTree(MeasuredLayout item, DrawCanvas canvas) { foreach (MeasuredLayout child in item.getCalculatedChildren()) { DrawCanvas canvasClone = canvas.Clone(); canvasClone.setTopLeft(item.getBounds().rect.Left, item.getBounds().rect.Top); child.drawable.draw(canvasClone, child.getBounds().rect); drawTree(child, canvasClone); } }