Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to call any Navigation.PushPopupAsync from CustomViewCell in Xamarin Form?

$
0
0

I have a ListView and which is having CustomViewCell. CustomViewCell having few buttons.

Button: ShowProfile: This button popup another page. The problem is I don't know how to Navigation.PushPopupAsync in CustomViewCell. I also need to pass current CustomViewCell details in that.

This is example how I use Navigation.PushPopupAsync in another page which is working fine but doesn't work in case of CustomViewCell.

Navigation.PushPopupAsync(new UserProfilePage(new ExtendedProfile(_viewModel.Profile)));

But above code doesn't work in CustomViewCell.

public partial class ProfileListItemViewCell : CustomViewCell
{
    public ProfileListItemViewCell()
    {
        InitializeComponent();
    }

    protected override void OnBindingContextChanged ()
    {
        base.OnBindingContextChanged ();
    }
    private void MenuItemProfile_Clicked(object sender, System.EventArgs e)
    {
        //not working
        Navigation.PushPopupAsync(new UserProfilePage(new ExtendedProfile(_viewModel.Profile)));
    }
}

Please suggest


Viewing all articles
Browse latest Browse all 204402

Trending Articles



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