maui-devexpress-dot-maui-dot-editors-dot-editbase-2d64fc7c.md
Fires when the user presses and holds the editor.
Namespace : DevExpress.Maui.Editors
Assembly : DevExpress.Maui.Editors.dll
NuGet Package : DevExpress.Maui.Editors
public event HandledEventHandler LongPress
The LongPress event's data class is HandledEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| Handled | Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing. |
Editors raise the following events on user interaction:
LongPress - Fires when the user presses and holds the editor.The following XAML assigns handlers to the Tap, DoubleTap, and LongPress events:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:dxe="clr-namespace:DevExpress.Maui.Editors;assembly=DevExpress.Maui.Editors"
x:Class="App1.MainPage">
<StackLayout>
<dxe:TextEdit Tap="TextEdit_Tap"
DoubleTap="TextEdit_DoubleTap"
LongPress="TextEdit_LongPress"/>
</StackLayout>
</ContentPage>
private void TextEdit_Tap(object sender, HandledEventArgs e) {
(sender as TextEdit).Text = "You tapped me!";
}
private void TextEdit_DoubleTap(object sender, HandledEventArgs e) {
(sender as TextEdit).Text = "You double tapped me!";
}
private void TextEdit_LongPress(object sender, HandledEventArgs e) {
(sender as TextEdit).Text = "You pressed me!";
}
See Also