コード例 #1
0
        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())
                {
                }
            }
        }
コード例 #2
0
 private VisualContext GetVisualContext()
 {
     if (visualContext == null)
     {
         visualContext = new VisualContext();
     }
     visualContext.Sources = this.DataSeries;
     return(visualContext);
 }
コード例 #3
0
 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);
     }
 }
コード例 #4
0
 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);
             }
         }
     }
 }
コード例 #5
0
        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);
                    }
                }
            }
        }
コード例 #6
0
 public void Render(VisualContext context)
 {
     RenderVisuals(context);
     InvalidateVisual();
     InvalidateMeasure();
 }