Exemplo n.º 1
0
        private static void OnStartTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            RadClock clock = d as RadClock;

            if (clock == null)
            {
                return;
            }

            if (clock.ItemsSource != null)
            {
                clock.ItemsSource = clock.GenerateItemsSource();
            }
        }
Exemplo n.º 2
0
        private static void OnTimeIntervalChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            RadClock clock = d as RadClock;

            if (clock == null)
            {
                return;
            }

            // NOTE: This cannot be true! TimeInterval is of type TimeSpan which is not nullable!
            if (clock.TimeInterval != null)
            {
                clock.TimeInterval = clock.ValidateTimeSpan(clock.TimeInterval);
            }
            if (clock.ItemsSource != null)
            {
                clock.ItemsSource = clock.GenerateItemsSource();
            }
        }