/// <summary>
 /// Renders a visual to a render target.
 /// </summary>
 /// <param name="visual">The visual.</param>
 /// <param name="target">The render target.</param>
 public static void Render(IVisual visual, IRenderTarget target)
 {
     using (var renderer = new ImmediateRenderer(visual))
         using (var context = new DrawingContext(target.CreateDrawingContext(renderer)))
         {
             renderer.Render(context, visual, visual.Bounds);
         }
 }