/// <summary> /// Renders object and children recursevelly. /// </summary> /// <param name="obj"></param> void RenderObject(IDisplayObject obj) { IGuiRenderer renderer = obj.Skin; if (renderer == null) { throw new InvalidOperationException(); } renderer.Render(canvas, obj); if (obj is IContainer) { foreach (object child in (obj as IContainer).Children) { if (child is IDisplayObject) { RenderObject(child as IDisplayObject); } } } }