Ejemplo n.º 1
0
        private static void OnDefaultVisualStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            BarIndicatorBase presenter = d as BarIndicatorBase;

            presenter.defaultVisualStyleCache = e.NewValue as Style;
            presenter.UpdateDefaultVisualsStyle();
        }
Ejemplo n.º 2
0
        private FrameworkElement GetDataPointVisual(DataPoint point, int virtualIndex)
        {
            FrameworkElement visual;

            if (virtualIndex < this.realizedDataPoints.Count)
            {
                visual            = this.realizedDataPoints[virtualIndex];
                visual.Visibility = Visibility.Visible;
                ContentPresenter presenter = visual as ContentPresenter;
                if (presenter != null)
                {
                    presenter.Content         = point;
                    presenter.ContentTemplate = this.GetDataTemplate(point);
                }
                else if (BarIndicatorBase.IsDefaultVisual(visual))
                {
                    this.SetDefaultVisualContent(visual, point);
                }
            }
            else
            {
                visual = this.CreateDataPointVisual(point);
            }

            if (visual != null)
            {
                visual.Tag = point;
            }

            return(visual);
        }
Ejemplo n.º 3
0
        private static void OnValueBindingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            BarIndicatorBase presenter = d as BarIndicatorBase;

            (presenter.dataSource as CategoricalSeriesDataSource).ValueBinding = e.NewValue as DataPointBinding;
        }