예제 #1
0
 private static void TimePropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
 {
     if (d != null & d is ClockUserCtrl)
     {
         ClockUserCtrl clock = d as ClockUserCtrl;
         clock.OnTimeUpdated((DateTime)e.OldValue, (DateTime)e.NewValue);
     }
 }
예제 #2
0
        private static void ExecuteSpeak(object sender, ExecutedRoutedEventArgs arg)
        {
            ClockUserCtrl clock = sender as ClockUserCtrl;

            if (clock != null)
            {
                clock.SpeakTheTime();
            }
        }
예제 #3
0
        private static void CanExecuteSpeak(object sender, CanExecuteRoutedEventArgs arg)
        {
            ClockUserCtrl clock = sender as ClockUserCtrl;

            arg.CanExecute = (clock != null);
        }