예제 #1
0
        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);
        }
예제 #2
0
        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
            };
        }
예제 #3
0
 public RatingListWrapper(RatingListModel model)
 {
     Model = model;
 }