OpenSilver 'Tapped' event not triggered on phone

62 Views Asked by At

I have a website made using OpenSilver (it's the new SilverLight, it's a framework that converts c# wpf code into web pages).

If I put on a TextBlock the WPF event 'Tapped', like this :

<TextBlock Text="Se connecter" 
           VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="50"
           Tapped="label_login_title_Tapped" />
private void TextBlock_Tapped(object sender, TappedRoutedEventArgs e)
{
    MessageBox.Show("test");
}

The event is triggered when :

  • I click on the textblock on my PC
  • I click on the textblock on my phone with 'Computer' mode activated in Chrome

But it doesn't trigger without 'computer' mode enabled.

How/what event to use to detect a touch and a click on an element of my page ?

1

There are 1 best solutions below

0
avdynut On

Seems like Tapped event does not work properly on mobile devices. Please use MouseLeftButtonDown event instead.

As OpenSilver is opensource framework, feel free to fix issues and make PRs.