/// <summary> /// IntervalTypeProperty property changed handler. /// </summary> /// <param name="d">DateTimeAxisLabel that changed its IntervalType.</param> /// <param name="e">Event arguments.</param> private static void OnIntervalTypePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DateTimeAxisLabel source = (DateTimeAxisLabel)d; DateTimeIntervalType oldValue = (DateTimeIntervalType)e.OldValue; DateTimeIntervalType newValue = (DateTimeIntervalType)e.NewValue; source.OnIntervalTypePropertyChanged(oldValue, newValue); }
/// <summary> /// Prepares an instance of the DateTimeAxisLabel class by setting its /// IntervalType property. /// </summary> /// <param name="label">An instance of the DateTimeAxisLabel class. /// </param> /// <param name="dataContext">The data context to assign to the label. /// </param> protected override void PrepareAxisLabel(Control label, object dataContext) { DateTimeAxisLabel dateTimeAxisLabel = label as DateTimeAxisLabel; if (dateTimeAxisLabel != null) { dateTimeAxisLabel.IntervalType = ActualIntervalType; } base.PrepareAxisLabel(label, dataContext); }
/// <summary> /// YearsIntervalStringFormatProperty property changed handler. /// </summary> /// <param name="d">DateTimeAxisLabel that changed its YearsIntervalStringFormat.</param> /// <param name="e">Event arguments.</param> private static void OnYearsIntervalStringFormatPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DateTimeAxisLabel source = (DateTimeAxisLabel)d; source.OnYearsIntervalStringFormatPropertyChanged(); }