void createLabsMarks() { var stackLayout = new StackLayout(); var resultsListViewSubGroup = new RoundedListView(typeof(StudentsPageViewCell)); var subGroup = subGroupPicker(); resultsListViewSubGroup = new RoundedListView(typeof(StudentsPageViewCell)) { IsPullToRefreshEnabled = false, }; resultsListViewSubGroup.ItemTapped += (sender, e) => ((RoundedListView)sender).SelectedItem = null; resultsListViewSubGroup.ItemsSource = labMarksList.Students; resultsListViewSubGroup.SetBinding(RoundedListView.SelectedItemProperty, "SelectedItem"); resultsListViewSubGroup.SetBinding(ItemsView <Cell> .ItemsSourceProperty, "LabsVisitingMarksSubGroup"); stackLayout = new StackLayout { VerticalOptions = LayoutOptions.Center, Padding = _headerPadding, Children = { subGroup, resultsListViewSubGroup, } }; Content = stackLayout; }
RoundedListView createList(View header) { var listView = new RoundedListView(typeof(CheckboxViewCell), true, header) { Margin = _listMargin }; listView.SetBinding(ItemsView <Cell> .ItemsSourceProperty, "ThemeList"); listView.SetBinding(ListView.SelectedItemProperty, "SelectedItem", BindingMode.TwoWay); return(listView); }
RoundedListView createList(View header) { var listView = new RoundedListView(null, true, header, () => new CheckboxViewCell(true)) { Margin = _listMargin }; listView.SetBinding(ItemsView <Cell> .ItemsSourceProperty, "FontList"); listView.SetBinding(ListView.SelectedItemProperty, "SelectedItem", BindingMode.TwoWay); return(listView); }
RoundedListView createRoundedListView() { var roundedListView = new RoundedListView(typeof(StudentsPageViewCell)) { IsPullToRefreshEnabled = false }; roundedListView.ItemTapped += (sender, e) => ((RoundedListView)sender).SelectedItem = null; roundedListView.SetBinding(RoundedListView.SelectedItemProperty, "SelectedItem"); roundedListView.SetBinding(ItemsView <Cell> .ItemsSourceProperty, "Students"); return(roundedListView); }
RoundedListView createList(View header) { var settingsListView = new RoundedListView(typeof(SettingsPageViewCell), header: header) { Margin = _listMargin }; settingsListView.ItemTapped += (sender, e) => ((ListView)sender).SelectedItem = null; settingsListView.SetBinding(ListView.SelectedItemProperty, "SelectedItem"); settingsListView.SetBinding(ItemsView <Cell> .ItemsSourceProperty, "SettingsList"); return(settingsListView); }
RoundedListView createRoundedList(View header) { var roundedListView = new RoundedListView(typeof(StatsPageViewCell), header: header) { IsPullToRefreshEnabled = true }; roundedListView.ItemTapped += (sender, e) => ((ListView)sender).SelectedItem = null; roundedListView.SetBinding(ListView.IsRefreshingProperty, "IsLoading"); roundedListView.SetBinding(ListView.RefreshCommandProperty, "RefreshCommand"); roundedListView.SetBinding(ListView.SelectedItemProperty, "SelectedItem"); roundedListView.SetBinding(ItemsView <Cell> .ItemsSourceProperty, "PagesList"); return(roundedListView); }
ListView createSubjectsList() { var subjectsLabel = createSubjectsLabel(); var subjectsListView = new RoundedListView(typeof(CalendarSubjectsViewCell), header: subjectsLabel) { RowHeight = (int)_subjectRowHeight, IsEnabled = false, Margin = _subjectsMargin }; subjectsListView.SetBinding(ItemsView <Cell> .ItemsSourceProperty, "CalendarSubjects"); subjectsListView.SetBinding(HeightRequestProperty, "CalendarSubjectsHeight"); return(subjectsListView); }
RoundedListView createList(View header) { var filesListView = new RoundedListView(typeof(FilesPageViewCell), header: header) { IsPullToRefreshEnabled = true, Margin = _filesListMargin }; filesListView.SetBinding(ItemsView <Cell> .ItemsSourceProperty, "FileList"); filesListView.SetBinding(ListView.SelectedItemProperty, "SelectedItem", BindingMode.TwoWay); filesListView.SetBinding(ListView.IsRefreshingProperty, "IsLoading"); filesListView.SetBinding(ListView.RefreshCommandProperty, "RefreshCommand"); return(filesListView); }
RoundedListView createList(View header) { var listView = new RoundedListView(typeof(RecommendationsPageViewCell), header: header) { Margin = _listMargin, IsPullToRefreshEnabled = true }; listView.ItemSelected += (sender, e) => { ((ListView)sender).SelectedItem = null; }; listView.SetBinding(ItemsView <Cell> .ItemsSourceProperty, "Recommendations"); listView.SetBinding(ListView.IsRefreshingProperty, "IsLoading"); listView.SetBinding(ListView.RefreshCommandProperty, "RefreshCommand"); listView.SetBinding(ListView.SelectedItemProperty, "SelectedItem", BindingMode.TwoWay); return(listView); }
void createViews(string name) { var headerLayout = new StackLayout(); if (!string.IsNullOrEmpty(name)) { headerLayout.Children.Add(createStudentNameLabel(name)); } headerLayout.Children.Add(createSummary()); var resultsListView = new RoundedListView(typeof(StatsResultsPageViewCell), header: headerLayout) { IsPullToRefreshEnabled = true }; resultsListView.SetBinding(ItemsView <Cell> .ItemsSourceProperty, "Marks"); resultsListView.SetBinding(ListView.IsRefreshingProperty, "IsLoading"); resultsListView.SetBinding(ListView.RefreshCommandProperty, "RefreshCommand"); resultsListView.ItemSelected += (sender, e) => { ((ListView)sender).SelectedItem = null; }; Content = resultsListView; }
void createView() { var stackLayout = new StackLayout(); var resultsListView = new RoundedListView(typeof(VisitingPageViewCell)); var resultsListViewSubGroup = new RoundedListView(typeof(VisitingPageViewCell)); var saveDate = stackView(); if (_title == CrossLocalization.Translate("stats_page_lectures_visiting")) { var dateforLectures = dateLecturesPicker(); resultsListView = new RoundedListView(typeof(VisitingPageViewCell)) { IsPullToRefreshEnabled = false, }; resultsListView.ItemsSource = groupData.GroupsVisiting; resultsListView.SetBinding(ItemsView <Cell> .ItemsSourceProperty, "LecturesMarks"); stackLayout = new StackLayout { VerticalOptions = LayoutOptions.Center, Padding = _headerPadding, Children = { saveDate, dateforLectures, resultsListView, } }; } else if (_title == CrossLocalization.Translate("stats_page_labs_visiting")) { var dateforLabs = dateLabsPicker(); var subGroupLabsVisiting = subGroupPicker(); resultsListViewSubGroup = new RoundedListView(typeof(VisitingPageViewCell)) { IsPullToRefreshEnabled = false, }; resultsListViewSubGroup.ItemsSource = labsVisitingList.Students; resultsListViewSubGroup.SetBinding(ItemsView <Cell> .ItemsSourceProperty, "LabsVisitingMarksSubGroup"); stackLayout = new StackLayout { VerticalOptions = LayoutOptions.Center, Padding = _headerPadding, Children = { saveDate, subGroupLabsVisiting, dateforLabs, resultsListViewSubGroup, } }; } else if (_title == CrossLocalization.Translate("practiсe_visiting")) { var dateforPractice = datePractPicker(); resultsListView = new RoundedListView(typeof(VisitingPageViewCell)) { IsPullToRefreshEnabled = false, }; resultsListView.ItemsSource = particialVisitingList.Students; resultsListView.SetBinding(ItemsView <Cell> .ItemsSourceProperty, "LecturesMarks"); stackLayout = new StackLayout { VerticalOptions = LayoutOptions.Center, Padding = _headerPadding, Children = { saveDate, dateforPractice, resultsListView, } }; } Content = stackLayout; }