Esempio n. 1
0
        public Page GetAllTasks()
        {

            contactList = new ListView
            {                
                RowHeight = 50,
                HasUnevenRows = true,
                
            };
            //userTaskInfo[0].earningPerThreads            
                       
            FetchUserAllTaskDetailFromServer();

            //contactList.ItemTemplate = new DataTemplate(typeof(TextCell));
            //contactList.ItemTemplate.SetBinding(TextCell.TextProperty, "title");
            //contactList.ItemTemplate.SetBinding(TextCell.DetailProperty, "earningPerThreads");

            contactList.ItemTemplate = new DataTemplate(typeof(AllTaskListCell));

            contactList.ItemTapped += async (sender, e) =>
            {
                var selectedItem = (UserProductSurveyTemplateModel)e.Item;
                //await DisplayAlert("Tapped!", e.SelectedItem + " was tapped.", "OK",null);
                var selectedItemPage = new UserTaskInformation(selectedItem); // so the new page shows correct data                
                new UserRootPage().PushAsyncModalPage(selectedItemPage);                
            };
            

            _allTasksPage = new ContentPage
            {
                Padding = new Thickness(20),
                Title = "All CITs",
			    Icon = "Leads.png",
                IsBusy = true,
                //BackgroundColor = Color.Black,
                Content = new StackLayout
                {
                    VerticalOptions = LayoutOptions.FillAndExpand,
                    Children = {contactList }
                }
            };

            return _allTasksPage;
        }
Esempio n. 2
0
        public Page GetAllTasks()
        {
            contactList = new ListView
            {
                RowHeight     = 50,
                HasUnevenRows = true,
            };
            //userTaskInfo[0].earningPerThreads

            FetchUserAllTaskDetailFromServer();

            //contactList.ItemTemplate = new DataTemplate(typeof(TextCell));
            //contactList.ItemTemplate.SetBinding(TextCell.TextProperty, "title");
            //contactList.ItemTemplate.SetBinding(TextCell.DetailProperty, "earningPerThreads");

            contactList.ItemTemplate = new DataTemplate(typeof(AllTaskListCell));

            contactList.ItemTapped += async(sender, e) =>
            {
                var selectedItem = (UserProductSurveyTemplateModel)e.Item;
                //await DisplayAlert("Tapped!", e.SelectedItem + " was tapped.", "OK",null);
                var selectedItemPage = new UserTaskInformation(selectedItem); // so the new page shows correct data
                new UserRootPage().PushAsyncModalPage(selectedItemPage);
            };


            _allTasksPage = new ContentPage
            {
                Padding = new Thickness(20),
                Title   = "All CITs",
                Icon    = "Leads.png",
                IsBusy  = true,
                //BackgroundColor = Color.Black,
                Content = new StackLayout
                {
                    VerticalOptions = LayoutOptions.FillAndExpand,
                    Children        = { contactList }
                }
            };

            return(_allTasksPage);
        }