Declined
Last Updated: 10 Mar 2023 08:55 by ADMIN
Legrand
Created on: 08 Mar 2023 16:18
Category: UI for .NET MAUI
Type: Feature Request
0
GestureRecognizers

Is it possible to use GestureRecognizers in ImageEditor ? I tried this, but OnImageTapped is not called.

<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
             xmlns:versares="clr-namespace:SharedResources;assembly=SharedResources"
             x:Class="PalletGate.Views.SingleEditor">
    <Grid ColumnDefinitions="*">

        <telerik:RadImageEditor x:Name="imageEditor1" 
                        MinZoomLevel="0.1" 
                        MaxZoomLevel="20"
                        Grid.Column="0"
                        >
            <telerik:RadImageEditor.GestureRecognizers>
                <TapGestureRecognizer Tapped="OnImageTapped" />
            </telerik:RadImageEditor.GestureRecognizers>
        </telerik:RadImageEditor>
    </Grid>
</ContentView>

Code behind :

    private void OnImageTapped(object sender, TappedEventArgs e) {
        Point? position = e.GetPosition((Element)sender);

         Telerik.Maui.Controls.RadImageEditor? img = sender as Telerik.Maui.Controls.RadImageEditor;
    }

 

 

2 comments
Legrand
Posted on: 10 Mar 2023 08:50
Problem solved, certainly a mistake on my side :)
ADMIN
Didi
Posted on: 10 Mar 2023 07:34

Hi Legrand,

I tested the case on my side and the tap gesture fires as expected. I am using Visual Studio 2022 official. .NET 7 and testing on WinUI. I have attached a video.

Could you please check whether on Visual Studio official. From the ticket info you are using a preview version. If the issue still persists with the official version, send me a sample project with the exact implementation you have.

Regards,
Didi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Attached Files: