private void UndoCmdCanExecute(object sender, CanExecuteRoutedEventArgs e) { e.CanExecute = DocumentState.CanUndo(); e.Handled = true; }