public RatingGridPage() { Model = new RatingListModel(); Model.ItemsChanged += OnItemsChanged; BackgroundColor = Color.White; Title = AppResources.ProfileRatingBtnHeader; int width = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Width) - 20; _gridView = new GridView { RowSpacing = 5, ColumnSpacing = 5, ContentPaddingBottom = 0, ContentPaddingTop = 20, ContentPaddingLeft = 10, ContentPaddingRight = 0, ItemWidth = width, ItemHeight = 40, ItemTemplate = new DataTemplate(typeof(RatingFastCell)) }; Content = _gridView; AppController.Instance.UpdateRating(Model.Users, null); }
public RatingPage() { Model = new RatingListModel(); Model.ItemsChanged += OnItemsChanged; BackgroundColor = Color.Transparent; Title = AppResources.ProfileRatingBtnHeader; var wrapper = new RatingListWrapper(Model); _listView = new ListView { HasUnevenRows = false, RowHeight = 60, ItemTemplate = new DataTemplate(typeof(RatingUserCell)), SeparatorVisibility = SeparatorVisibility.None, BackgroundColor = Color.Transparent, ItemsSource = Model.Items, RefreshCommand = wrapper.RefreshCommand, IsPullToRefreshEnabled = true, BindingContext = wrapper }; _listView.SetBinding <RatingListWrapper> (ListView.IsRefreshingProperty, vm => vm.IsBusy, BindingMode.OneWay); BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, new ContentView { Content = _listView }, true, true); //, Padding = new Thickness(10) // BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, layout, false, true); Content = new ScrollView { Content = bgLayout }; }
public RatingListWrapper(RatingListModel model) { Model = model; }