TextBoxBase.Paste TextBoxBase.Paste TextBoxBase.Paste TextBoxBase.Paste Method

定义

将剪贴板的内容粘贴到文本编辑控件中的当前选定内容上。Pastes the contents of the Clipboard over the current selection in the text editing control.

public:
 void Paste();
public void Paste ();
member this.Paste : unit -> unit
Public Sub Paste ()

示例

下面的示例演示如何使用Paste方法将所选内容粘贴TextBox到控件中。The following example demonstrates how to use the Paste method to paste selected content into a TextBox control.

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

适用于

另请参阅