UIElement.TextInputStart Event

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Occurs when a UI element initially gets text in a device-independent manner.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public Event TextInputStart As TextCompositionEventHandler
public event TextCompositionEventHandler TextInputStart
<uiElement TextInputStart="eventhandler"/>

Remarks

Use a handler based on TextCompositionEventHandler to handle this event.

This event is a bubbling event. This means that if multiple TextInputStart handlers are registered for a sequence of objects connected by parent-child relationships in the object tree, the event is received by each object in that relationship, with the route going in the parent direction. The sender available to the event handler identifies the object where the event is handled, not necessarily the object that actually received the input condition that initiated the event. To get the object that initiated the event, use the OriginalSource value of the event's RoutedEventArgs event data. For more information on routed event concepts, see Events Overview for Silverlight.

This event occurs at the start of text input processing both at the start of IME text entry as well as regular text input. The scenario for using this event as opposed to TextInput is mainly for processing IME input. Generally, IME is only enabled for text input controls. However, the event could still bubble up to a container and be handled there.

IME support in Silverlight also includes attached properties that can influence IME handling and behavior, which can be set on a TextBox. See InputMethod.

TextInputStart and OnTextInputStart

For control classes (anything that derives from Control) there is potentially an assigned virtual/override handler for this event, as defined by OnTextInputStart.

Version Information

Silverlight

Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.