Ejemplo n.º 1
0
 protected override void OnDetachingFrom(SampleView bindable)
 {
     listView        = null;
     PagingViewModel = null;
     dataPager       = null;
     base.OnDetachingFrom(bindable);
 }
 protected override void OnAttachedTo(ContentPage bindable)
 {
     listView                   = bindable.FindByName <Syncfusion.ListView.XForms.SfListView>("listView");
     dataPager                  = bindable.FindByName <SfDataPager>("dataPager");
     PagingViewModel            = new PagingViewModel();
     listView.BindingContext    = PagingViewModel;
     dataPager.PageCount        = 5;
     dataPager.OnDemandLoading += DataPager_OnDemandLoading;
     base.OnAttachedTo(bindable);
 }
Ejemplo n.º 3
0
 protected override void OnAttachedTo(SampleView bindable)
 {
     listView                   = bindable.FindByName <Syncfusion.ListView.XForms.SfListView>("listView");
     dataPager                  = bindable.FindByName <SfDataPager>("dataPager");
     PagingViewModel            = new PagingViewModel();
     listView.BindingContext    = PagingViewModel;
     dataPager.Source           = PagingViewModel.pagingProducts;
     dataPager.OnDemandLoading += DataPager_OnDemandLoading;
     base.OnAttachedTo(bindable);
 }
        protected override void OnAttachedTo(ContentPage bindable)
        {
            viewModel                   = new ListViewSwipingViewModel();
            firstLV                     = bindable.FindByName <Syncfusion.ListView.XForms.SfListView>("firstLV");
            secondLV                    = bindable.FindByName <Syncfusion.ListView.XForms.SfListView>("secondLV");
            button                      = bindable.FindByName <Button>("Reset");
            sfPullToRefresh             = bindable.FindByName <SfPullToRefresh>("pullToRefresh");
            sfPullToRefresh.Refreshing += SfPullToRefresh_Refreshing;

            firstLV.BindingContext  = viewModel;
            secondLV.BindingContext = viewModel;
            button.BindingContext   = viewModel;
            firstLV.ItemsSource     = viewModel.FirstLVCollection;
            firstLV.ItemsSource     = viewModel.SecondLVCollection;

            viewModel.firstLV  = firstLV;
            viewModel.secondLV = secondLV;

            base.OnAttachedTo(bindable);
        }
        public void AddDayLayOutToAbsoluteLayOut(Syncfusion.ListView.XForms.SfListView list)
        {
            if (AddedAlready)
            {
                return;
            }
            if (absolute.Children.Count == 2)
            {
                absolute.Children.RemoveAt(1);
            }
            // Position the pageLayout to fill the entire screen.
            // Manage positioning of child elements on the page by editing the pageLayout.
            AbsoluteLayout.SetLayoutFlags(list, AbsoluteLayoutFlags.All);
            AbsoluteLayout.SetLayoutBounds(list, new Rectangle(0f, 0f, 1f, 1f));
            absolute.Children.Add(list);
            // Overlay the radialmenue in the bottom-right corner
            var rad = SetupRadialMenu();

            AbsoluteLayout.SetLayoutFlags(rad, AbsoluteLayoutFlags.YProportional);
            AbsoluteLayout.SetLayoutBounds(rad, new Rectangle(1f, 1f, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize));
            absolute.Children.Add(rad);
            AddedAlready = true;
        }
 protected override void OnDetachingFrom(ContentPage bindable)
 {
     firstLV  = null;
     secondLV = null;
     base.OnDetachingFrom(bindable);
 }
Ejemplo n.º 7
0
 protected override void OnAttachedTo(SampleView bindable)
 {
     listview             = bindable.FindByName <Syncfusion.ListView.XForms.SfListView>("listView");
     listview.ItemTapped += ListView_ItemTapped;
 }
Ejemplo n.º 8
0
 protected override void OnAttachedTo(SampleView bindable)
 {
     listview             = bindable.FindByName <Syncfusion.ListView.XForms.SfListView>("listView");
     listview.ItemsSource = AccordionViewModel.ContactsInfo;
     listview.ItemTapped += ListView_ItemTapped;
 }