Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SelectionChanged Event
Collapse the table of content
Expand the table of content

TextBoxBase.SelectionChanged Event

Occurs when the text selection has changed.

Namespace:  System.Windows.Controls.Primitives
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

'Declaration
Public Event SelectionChanged As RoutedEventHandler
<object SelectionChanged="RoutedEventHandler" .../>

Identifier field

SelectionChangedEvent

Routing strategy

Bubbling

Delegate

RoutedEventHandler

The following example demonstrates how to handle the SelectionChanged event by using code.

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft