private void CommandCopy(object sender, ExecutedRoutedEventArgs e) { if (this.currentTabIndex >= 0) { Clipboard.SetText(this.tab[this.currentTabIndex].TextEditor.SelectedText); } }