private void ListViewDate_OnItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
{
var appointment = e.ItemData as DetailsContactInfo;
if (appointment != null)
{
PopupDate.BindingContext = null;
PopupDate.PopupView.ContentTemplate = null;
PopupDate.BindingContext = appointment;
var customTemplate = new DataTemplate(() =>
{
var contactName = new Label();
contactName.SetBinding(Label.TextProperty, new Binding("ContactName", BindingMode.Default, null, null, null, appointment));
var contactNumber = new Label();
contactNumber.SetBinding(Label.TextProperty, new Binding("ContactNumber", BindingMode.Default, null, null, null, appointment));
var stack = new StackLayout();
stack.Children.Add(contactName);
stack.Children.Add(contactNumber);
var viewcell = new ViewCell()
{
View = stack,
};
return viewcell;
});
PopupDate.PopupView.ContentTemplate = customTemplate;
PopupDate.Show();
}
}
|