local:???? in contentview tap gesture not open new Page

DuckDeokDuckDeok Member ✭✭
edited March 2018 in Xamarin.Forms

In ListIvew DataTemplate
{ <DataTemplate> <StackLayout HorizontalOptions="FillAndExpand" BackgroundColor="White"> <local:NewListView/> </StackLayout> </DataTemplate> }

In NewListView.xmal.cs

<Image Grid.Column="13" Source="Reply_UnChecked.png"> <Image.GestureRecognizers> <TapGestureRecognizer Tapped="OnClickReply" NumberOfTapsRequired="1" /> </Image.GestureRecognizers> </Image>

In NewListView.cs

private void OnClickReply(object sender, EventArgs e) { var page = new LoudReplyPage(); Navigation.PushAsync(page); System.Diagnostics.Debug.WriteLine("Replay Page Open"); }

when i tapped OnClickReply the Debug was showed but the page did not create and open

How can i create and open the new page when upper case?

Answers

  • JohnHardmanJohnHardman GBUniversity mod

    @DuckDeok - First thing - await the call to Navigation.PushAsync

  • seanydaseanyda GBMember ✭✭✭✭✭

    Try this in NewListView.cs

    async void OnClickReply(object sender, EventArgs e)         
    {                      
        await Navigation.PushAsync(new LoudReplyPage());                      
        System.Diagnostics.Debug.WriteLine("Replay Page Open");         
    } 
    
  • DuckDeokDuckDeok Member ✭✭

    private async void OnClickReply(object sender, EventArgs e) { var page = new LoudReplyPage(); await Navigation.PushAsync(page); }

    also did not work

  • DuckDeokDuckDeok Member ✭✭
    edited March 2018

    async void OnClickReply(object sender, EventArgs e) { await Navigation.PushAsync(new LoudReplyPage()); System.Diagnostics.Debug.WriteLine("Replay Page Open"); }

    also did not work

    strange thing is other image tap gesture that change opacity or x position is working well
    but create and open page is not work...

  • ajdinajdin Member

    @DuckDeok , did you maybe managed to solve this?

Sign In or Register to comment.