TextBoxBase.SelectAll 方法

定义

选择文本编辑控件的全部内容。

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

示例

以下示例演示如何使用 SelectAll 方法选择控件的所有内容 TextBox

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

适用于