[英]How do I create a message box for Xamarin Forms ListView?
The question is simple. 问题很简单。 I Need to have an message box for the cells in a listview app that was created.
我需要为已创建的listview应用程序中的单元格提供一个消息框。 However I failed, because the one time I did it, it was in a not XamarinForms App.
但是我失败了,因为有一次,它是在非XamarinForms应用程序中进行的。 Now I don't know how to create a message box that responds to each cell.
现在,我不知道如何创建一个响应每个单元格的消息框。
Code; 码;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace IconsApp
{
public partial class ListViewPage : ContentPage
{
public ListViewPage()
{
InitializeComponent();
MainListView.ItemsSource = new List<Element>
{
new Element {new Title = "ok", Description= "ok"},new Element {Title = "ok", Description = "ok"},
}
MainListView.ItemSelected += (sender, e) => {
var item = (Element) e.SelectedItem;
DisplayAlert(item.Title,item.Description,"OK");
};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.