public virtual void Render(VisualContext context) { Children.Clear(); var reDrawContext = false; var xAxis = this.DataSeries.XAxis; var yAxis = this.DataSeries.YAxis; var sources = context != null ? context.Sources : null; if (this.DataSeries != null && this.DataSeries.IsVisible && xAxis != null && yAxis != null /*&& sources != null*/) { using (DrawingContext dc = RenderOpen()) { reDrawContext = true; if (this.DataSeries.IsVisible) { Render(dc, this.DataSeries, this.DataSeries.XAxis, this.DataSeries.YAxis, this.DataSeries.PlotFlowAxisOption, sources); } } } if (reDrawContext == false) { using (DrawingContext dc = RenderOpen()) { } } }
private VisualContext GetVisualContext() { if (visualContext == null) { visualContext = new VisualContext(); } visualContext.Sources = this.DataSeries; return(visualContext); }
private void RenderVisuals(VisualContext context) { foreach (Visual visual in visuals) { DataSeriesVisual sourceVisual = visual as DataSeriesVisual; System.Diagnostics.Debug.Assert(sourceVisual != null, "sourceVisual != null"); sourceVisual.Render(context); } }
private void UpdateDataSeries(DependencyObject host, VisualContext visualContext) { if (host != null) { ISeriesRender sourceView = host as ISeriesRender; if (sourceView != null) { sourceView.Render(visualContext); } if (host != null) { for (int i = 0; i < VisualTreeHelper.GetChildrenCount(host); ++i) { DependencyObject item = VisualTreeHelper.GetChild(host, i); UpdateDataSeries(item, visualContext); } } } }
public virtual void Render(VisualContext context) { Children.Clear(); if (context == null) { return; } var xAxis = this.DataSeries.XAxis; var yAxis = this.DataSeries.YAxis; var sources = context.Sources; if (this.DataSeries != null && xAxis != null && yAxis != null && sources != null) { using (DrawingContext dc = RenderOpen()) { if (this.DataSeries.IsVisible) { Render(dc, this.DataSeries, this.DataSeries.XAxis, this.DataSeries.YAxis, context.Sources); } } } }
public void Render(VisualContext context) { RenderVisuals(context); InvalidateVisual(); InvalidateMeasure(); }