Esempio n. 1
0
        protected static void OnUseDirect2DChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            PlotPanel plotPanelLocal = ((PlotPanel)obj);

            if (plotPanelLocal.direct2DControl == null && plotPanelLocal.UseDirect2D)
            {
                // Create Direct2DControl:
                try
                {
                    plotPanelLocal.direct2DControl = new Direct2DControl();
                    plotPanelLocal.Children.Add(plotPanelLocal.direct2DControl);
                    plotPanelLocal.direct2DControl.SetValue(Grid.ZIndexProperty, 75);
                }
                catch (Exception)
                {
                    plotPanelLocal.direct2DControl = null;
                    plotPanelLocal.UseDirect2D     = false;
                }
                return;
            }
            if (plotPanelLocal.UseDirect2D)
            {
                plotPanelLocal.Children.Add(plotPanelLocal.direct2DControl);
            }
            else
            {
                plotPanelLocal.Children.Remove(plotPanelLocal.direct2DControl);
            }
            plotPanelLocal.InvalidateMeasure();
        }
Esempio n. 2
0
 protected override void UpdateTicksAndLabels()
 {
     if (PlotPanel != null)
     {
         PlotPanel.InvalidateMeasure();
     }
 }
Esempio n. 3
0
        protected static void OnEqualAxesChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            PlotPanel plotPanelLocal = ((PlotPanel)obj);

            if ((bool)e.NewValue == true)
            {
                plotPanelLocal.Axes.SetAxesEqual();
            }
            else
            {
                plotPanelLocal.Axes.ResetAxesEqual();
            }
            plotPanelLocal.InvalidateMeasure();
        }