private void Lowercase() { // save the selection int start = _textArea.SelectionStart; int end = _textArea.SelectionEnd; // modify the selected text _textArea.ReplaceSelection(_textArea.GetTextRange(start, end - start).ToLower()); // preserve the original selection _textArea.SetSelection(start, end); }
private void Lowercase() { // save the selection int start = TextArea.SelectionStart; int end = TextArea.SelectionEnd; // modify the selected text TextArea.ReplaceSelection(TextArea.GetTextRange(start, end - start).ToLower()); // preserve the original selection TextArea.SetSelection(start, end); addRecentCommand(LOWERCASE); }