TextBoxBase.Cut TextBoxBase.Cut TextBoxBase.Cut TextBoxBase.Cut Method

Definition

Removes the current selection from the text editing control and copies it to the Clipboard.

public:
 void Cut();
[System.Security.SecurityCritical]
public void Cut ();
member this.Cut : unit -> unit
Public Sub Cut ()

Examples

The following example demonstrates how to use the Cut method to delete the text that is selected in a TextBox control.

private void cutText(object sender, RoutedEventArgs e)
{
    myTextBox.Cut();
}
Private Sub cutText(ByVal sender As Object, ByVal e As RoutedEventArgs)
    myTextBox.Cut()
End Sub

Remarks

A cut operation removes the current selection from the text editing control and copies it to the Clipboard. Note that the selected text is removed (cut) from the text editing control in the process. A similar method, Copy, copies the current selection to the Clipboard, but does not remove the selected text from the text editing control.

Security

SecurityCriticalAttribute
for full trust for inheritors. This member cannot be inherited by partially trusted code.

Applies to

See also