Search code examples
c#eventsxamarinxamarin-zebblezebble

How to handle LongPressed event of a Zebble view or control


How can I subscribe to LongPressed event of a Zebble view like the following ImageView?

 <ImageView on-LongPressed="@ViewLongPressed"  on-Tapped="@ViewTapped"   />

I can handle on-tapped event with following method but doing the same do not work when I hold the left mouse button for a few seconds or clicking with middle mouse button .

 public async Task ViewTapped() =>
                await Nav.ShowPopUp<Pages.ListPage>(new { Item = Item });

Is it possible to trigger this event in the UWP simulator ?


Solution

  • Your code is correct.

    Long pressed event in (desktop) windows is fired by a single right click.