An axis label for displaying DateTime values.
상속: AxisLabel
예제 #1
0
        /// <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);
        }
예제 #2
0
        /// <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);
        }
예제 #3
0
        /// <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();
        }