Exemplo n.º 1
0
        private void ListView_ItemHolding(object sender, Syncfusion.ListView.XForms.ItemHoldingEventArgs e)
        {
            var orderDetails = (e.ItemData) as OrderDetails;

            if (orderDetails != null)
            {
                popupLayout.PopupView.BindingContext = orderDetails;
                popupLayout.PopupView.HeaderTitle    = "Notes";
                popupLayout.PopupView.ShowFooter     = false;

                var customTemplate = new DataTemplate(() =>
                {
                    var notes = new Label();
                    notes.SetBinding(Label.TextProperty, new Binding("Notes", BindingMode.Default, null, null, null, orderDetails));


                    var stack     = new StackLayout();
                    stack.Padding = new Thickness(10, 20, 10, 0);
                    stack.Children.Add(notes);


                    var viewcell = new ViewCell()
                    {
                        View = stack,
                    };

                    return(viewcell);
                });

                popupLayout.PopupView.ContentTemplate = customTemplate;
                popupLayout.Show();
            }
            //popupLayout.BindingContext= orderDetails;
            //popupLayout.Show();
        }
Exemplo n.º 2
0
        private void Bindable_ItemHolding(object sender, Syncfusion.ListView.XForms.ItemHoldingEventArgs e)
        {
            if (Command == null)
            {
                return;
            }

            object parameter = Converter.Convert(e, typeof(object), null, null);

            if (Command.CanExecute(parameter))
            {
                Command.Execute(parameter);
            }
        }
Exemplo n.º 3
0
        void Handle_ItemHolding(object sender, Syncfusion.ListView.XForms.ItemHoldingEventArgs e)
        {
            if (listView.SelectedItems.Count > 0)
            {
                listView.SelectedItems.Clear();
            }
            for (int i = 1; i < model.ModelList.Count; i++)
            {
                model.ModelList[i].SelectedImageVisibility = "true";
#if COMMONSB
                model.ModelList[i].SelectionImage = ImageSource.FromResource("SampleBrowser.Icons.NotSelected.png", assembly);
#else
                model.ModelList[i].SelectionImage = ImageSource.FromResource("SampleBrowser.SfImageEditor.Icons.NotSelected.png", assembly);
#endif
            }
            listView.SelectionChanged += ListView_SelectionChanged;
            deleteImage.IsVisible      = true;
        }
 void Handle_ItemHolding(object sender, Syncfusion.ListView.XForms.ItemHoldingEventArgs e)
 {
     if (listView.SelectedItems.Count > 0)
     {
         listView.SelectedItems.Clear();
     }
     for (int i = 1; i < model.ModelList.Count; i++)
     {
         model.ModelList[i].SelectedImageVisibility = "true";
         model.ModelList[i].SelectionImage          = new FontImageSource()
         {
             Glyph      = "\ue718",
             FontFamily = Device.RuntimePlatform == Device.iOS ? "Sync FontIcons" : Device.RuntimePlatform == Device.Android ? "Sync FontIcons.ttf#" : "Sync FontIcons.ttf#Sync FontIcons",
             Color      = Color.LightGray
         };
     }
     listView.SelectionChanged += ListView_SelectionChanged;
     deleteImage.IsVisible      = true;
 }