共用方式為


TextBoxBase.SelectionChanged 事件

定義

文字選取變更時發生。

public:
 event System::Windows::RoutedEventHandler ^ SelectionChanged;
public event System.Windows.RoutedEventHandler SelectionChanged;
member this.SelectionChanged : System.Windows.RoutedEventHandler 
Public Custom Event SelectionChanged As RoutedEventHandler 

事件類型

範例

下列範例示範如何使用程式碼來處理 SelectionChanged 事件。

private void selectChanged(object sender, RoutedEventArgs e)
{
    myTextBox.AppendText("Selection Changed event in myTextBox2 has just occurred.");
}
Private Sub selectChanged(ByVal sender As Object, ByVal e As RoutedEventArgs)
    myTextBox.AppendText("Selection Changed event in myTextBox2 has just occurred.")
End Sub

備註

路由事件資訊

識別碼欄位 SelectionChangedEvent
路由策略 鼓 泡
代理人 RoutedEventHandler

適用於