private void CanExecuteSpeak(object sender, CanExecuteRoutedEventArgs e) { DigitalClcok digital = (DigitalClcok)sender; if (digital.Time != null) { e.CanExecute = true; } else { e.CanExecute = false; } }
private void ExecuteSpeak(object sender, ExecutedRoutedEventArgs e) { DigitalClcok digital = (DigitalClcok)sender; digital.SpeakTheTime(digital.Time); }