コード例 #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;
            }
        }
コード例 #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;
            }
        }
コード例 #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;
            }
        }
コード例 #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;
            }
        }
コード例 #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));
            }
        }
コード例 #6
0
        private static void OnLabelTemplateChanged(DependencyObject target, DependencyPropertyChangedEventArgs e)
        {
            ScalePrimitive presenter = target as ScalePrimitive;

            presenter.labelTemplateCache = e.NewValue as DataTemplate;
        }
コード例 #7
0
        private static void OnTickStyleChanged(DependencyObject target, DependencyPropertyChangedEventArgs e)
        {
            ScalePrimitive scale = target as ScalePrimitive;

            scale.tickStyleCache = e.NewValue as Style;
        }