# .NET MAUI Entry Events

The Telerik UI for .NET MAUI Entry control exposes a number of events and commands for notifying after user interactions.

The Entry supports the following events:

* `TextChanged`—Occurs when the text is changed. The `TextChanged` event handler receives a `TextChangedEventArgs` argument containing data related to this event. The `TextChangedEventArgs` provides the following properties:
  * `NewTextValue` (`string)`—Gets the new text value.
  * `OldTextValue` (`string)`—Gets the old text value.

* `TextChanging`—Occurs when the text in the control starts to change, but before the `Text` property is updated. The `TextChanging` event handler receives a `TextChangingEventArgs` argument containing data related to this event. The `TextChangedEventArgs` provides the following properties:
  * `NewText` (`string`)—Gets the new text that is about to be entered into the input view.
  * `OldText` (`string`)—Gets the old text that is entered into the input view.
  * `Cancel` (`bool`)—Gets or sets a value that indicates whether to cancel the text changes.

* `Completed`—Occurs when the user finalizes the text.

The `Completed` event is raised when pressing the `Return` key on the keyboard.

The following example demonstrates the Entry definition in XAML with the `TextChanged` and `Completed` event handlers.

**1.** Define the Entry.

```XAML
<VerticalStackLayout>
   <telerik:RadEntry x:Name="entry"
                     Keyboard="Numeric"
                     Placeholder="Enter a number"
                     TextChanged="Entry_TextChanged"
                     Completed="Entry_Completed"/>
   <Label x:Name="textChangedLabel"/>
</VerticalStackLayout>
```

**2.** Set the `TextChanged` event.

```C#
private void Entry_TextChanged(object sender, TextChangedEventArgs e)
{
    this.textChangedLabel.Text = $"Text changed from {e.OldTextValue} to {e.NewTextValue}";
}
```

**3.** Set the `Completed` event.

```C#
private void Entry_Completed(object sender, EventArgs e)
{
    this.textChangedLabel.Text = "User completed entering text";
}
```

## See Also

* [Entry Getting Started](https://www.telerik.com/maui-ui/documentation/controls/entry/getting-started)
* [Entry Styling](https://www.telerik.com/maui-ui/documentation/controls/entry/styling)
