private static void OnLabelFormatChanged(DependencyObject target, DependencyPropertyChangedEventArgs e) { ScalePrimitive presenter = target as ScalePrimitive; if (presenter.IsTemplateApplied) { presenter.panel.Model.LabelFormat = (string)e.NewValue; } }
private static void OnTickLengthChanged(DependencyObject target, DependencyPropertyChangedEventArgs e) { ScalePrimitive presenter = target as ScalePrimitive; if (presenter.IsTemplateApplied) { presenter.panel.Model.TickLength = (double)e.NewValue; } }
private static void OnTickPlacementChanged(DependencyObject target, DependencyPropertyChangedEventArgs e) { ScalePrimitive presenter = target as ScalePrimitive; if (presenter.IsTemplateApplied) { presenter.panel.Model.TickPlacement = (ScaleElementPlacement)e.NewValue; } }
private static void OnOrientationChanged(DependencyObject target, DependencyPropertyChangedEventArgs e) { ScalePrimitive presenter = target as ScalePrimitive; if (presenter.IsTemplateApplied) { presenter.panel.Model.Orientation = (Orientation)e.NewValue; } }
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)); } }
private static void OnLabelTemplateChanged(DependencyObject target, DependencyPropertyChangedEventArgs e) { ScalePrimitive presenter = target as ScalePrimitive; presenter.labelTemplateCache = e.NewValue as DataTemplate; }
private static void OnTickStyleChanged(DependencyObject target, DependencyPropertyChangedEventArgs e) { ScalePrimitive scale = target as ScalePrimitive; scale.tickStyleCache = e.NewValue as Style; }