How to display popup by clicking item in listview?

I want to achieve something like given in screen below
can anyone please suggest or guide how to implement same
thanks in advance

Tagged:

Answers

  • JamesLaveryJamesLavery GBBeta, University ✭✭✭✭✭

    I'd suggest the Rg.Plugings.Popup package for displaying the popup.

    To trigger the display using a Command (rather than an Event in code behind), see this thread.

  • JarvanJarvan Member, Xamarin Team Xamurai

    Try to use DisplayActionSheet. Tutorial here. And You can refer to the following code.

    page.xaml.cs

    public Page_1()
    {
        InitializeComponent();
            ...
    
            listview.ItemsSource = list;
        listview.ItemSelected += async (s, e) =>
        {
            Image_model select_item = (Image_model)listview.SelectedItem;
            var action = await DisplayActionSheet("ActionSheet: Send to?", "Cancel", null, "Resend Invite", "Disable User", "Delete User");
            switch (action)
            {
                case "Resend Invite":
                    Resend_Invite(select_item);
                    break;
                case "Disable User":
                    Disable_User(select_item);
                    break;
                case "Delete User":
                    Delete_User(select_item);
                    break;
            }
        };
    }
    
    private void Disable_User(Image_model select_item)
    {
        throw new NotImplementedException();
    }
    
    private void Resend_Invite(Image_model select_item)
    {
        throw new NotImplementedException();
    }
    
    private void Delete_User(Image_model select_item)
    {
        list.Remove(select_item);
        listview.ItemsSource = list;
    }
    

  • JamesLaveryJamesLavery GBBeta, University ✭✭✭✭✭

    @yelinzh said:
    Try to use DisplayActionSheet.

    Good point - it's easy to overlook Action Sheets.

  • Rameshbodh_Rameshbodh_ Member ✭✭
    edited April 17

    @JamesLavery @yelinzh
    thanks for your response

    I want to display the popup(no action sheet) below 3 dotted for any list item whenever i tapped 3 dotted of the particular dotted image

  • JarvanJarvan Member, Xamarin Team Xamurai

    You can try Syncfusion.Xamarin.SfPopupLayout .
    The Popup layout provides a layout that allows users to display an alert message with customizable buttons or load any desired view inside a popup. It provides options to fully customize the popup with custom header, body, and footer capabilities, allowing you to display important information to use precisely how user want to.

    Tutorial here: https://help.syncfusion.com/xamarin/sfpopuplayout/getting-started

Sign In or Register to comment.