protected override void OnRender(DrawingContext drawingContext) { base.OnRender(drawingContext); graph.UpdateTransform(ActualWidth * (1 - 2 * InnerMargin), ActualHeight * (1 - 2 * InnerMargin), ActualWidth * InnerMargin, ActualHeight * InnerMargin); drawingContext.DrawDrawing(graph.Drawing); }