public void Render(IElement rootComponent) { var sw1 = Stopwatch.StartNew(); context = new UIContext(box, buffer); rootComponent.Draw(new Point(0, 0), new BoxConstraint(0, box.Width, 0, box.Height), context); buffer.ApplyChanges(box); box.Flush(); box.SetCursor(context.CursorPosition.X, context.CursorPosition.Y); box.SetCursorVisibility(context.CursorVisible); sw1.Stop(); //Trace.WriteLine(" Render: " + sw1.ElapsedMilliseconds.ToString()); }