private void MenuEdit_Opened(object sender, RoutedEventArgs e) { MenuUndo.IsEnabled = SB.CanUndo(); MenuRedo.IsEnabled = SB.CanRedo(); MenuPaste.IsEnabled = SB.CanPaste(); }