Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Stacklayout GestureRecognizers is not working in UWP(Working fine in IOS and Android)

$
0
0

I have an entry surrounded by stacklayout and for the stack I added GestureRecognizers like below:

 <StackLayout>
        <Entry
            TextColor="Black"
            x:Name="phoneone"/>
            <StackLayout.GestureRecognizers>
                <TapGestureRecognizer
                        Tapped="CallingPhone1"
                        NumberOfTapsRequired="1">
                </TapGestureRecognizer>
            </StackLayout.GestureRecognizers> 
    </StackLayout>

My CallingPhone1 code:

public async void CallingPhone1(object sender,EventArgs args)
 {
        Debug.WriteLine("Enter1");
        var answer = await DisplayAlert("Alert", "Do you want to call this number?", "Yes", "No");
        if (answer)
        {
            string firstphone = phoneone.Text;
            try
            {
                PhoneDialer.Open(firstphone);
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Exception:>>" + ex);
            }
        }
    }

When I Tap on the Entry, noting is happening in UWP. But showing The thread 0x6adc has exited with code 0 (0x0) in output box. I am using xamarin.forms 2.5.0.121934.

Thanks in advance :smile:


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>