Ejemplo n.º 1
0
        private static void OnLabelFormatChanged(DependencyObject target, DependencyPropertyChangedEventArgs e)
        {
            ScalePrimitive presenter = target as ScalePrimitive;

            if (presenter.IsTemplateApplied)
            {
                presenter.panel.Model.LabelFormat = (string)e.NewValue;
            }
        }
Ejemplo n.º 2
0
        private static void OnTickLengthChanged(DependencyObject target, DependencyPropertyChangedEventArgs e)
        {
            ScalePrimitive presenter = target as ScalePrimitive;

            if (presenter.IsTemplateApplied)
            {
                presenter.panel.Model.TickLength = (double)e.NewValue;
            }
        }
Ejemplo n.º 3
0
        private static void OnTickPlacementChanged(DependencyObject target, DependencyPropertyChangedEventArgs e)
        {
            ScalePrimitive presenter = target as ScalePrimitive;

            if (presenter.IsTemplateApplied)
            {
                presenter.panel.Model.TickPlacement = (ScaleElementPlacement)e.NewValue;
            }
        }
Ejemplo n.º 4
0
        private static void OnOrientationChanged(DependencyObject target, DependencyPropertyChangedEventArgs e)
        {
            ScalePrimitive presenter = target as ScalePrimitive;

            if (presenter.IsTemplateApplied)
            {
                presenter.panel.Model.Orientation = (Orientation)e.NewValue;
            }
        }
Ejemplo n.º 5
0
        private static void OnAxisLineOffsetChanged(DependencyObject target, DependencyPropertyChangedEventArgs e)
        {
            ScalePrimitive scale = target as ScalePrimitive;

            if (scale.IsInternalPropertyChange)
            {
                scale.axisLineOffsetCache = (Thickness)e.NewValue;
            }
            else
            {
                throw new InvalidOperationException(string.Format(CultureInfo.CurrentUICulture, "{0} is a read-only property.", AxisLineOffsetPropertyName));
            }
        }
Ejemplo n.º 6
0
        private static void OnLabelTemplateChanged(DependencyObject target, DependencyPropertyChangedEventArgs e)
        {
            ScalePrimitive presenter = target as ScalePrimitive;

            presenter.labelTemplateCache = e.NewValue as DataTemplate;
        }
Ejemplo n.º 7
0
        private static void OnTickStyleChanged(DependencyObject target, DependencyPropertyChangedEventArgs e)
        {
            ScalePrimitive scale = target as ScalePrimitive;

            scale.tickStyleCache = e.NewValue as Style;
        }