Inheritance: Xamarin.Forms.ScrollView
コード例 #1
0
        // ---------------------------------------------------------

        #region Private Methods

        private CarouselLayout CreatePagesCarousel()
        {
            _carouselLayout = new CarouselLayout {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions   = LayoutOptions.FillAndExpand,
                IndicatorStyle    = CarouselLayout.IndicatorStyleEnum.None,
                ItemTemplate      = new DataTemplate(typeof(ImageTemplate))
            };

            return(_carouselLayout);
        }
コード例 #2
0
        private CarouselLayout CreatePagesCarousel()
        {
            _carouselLayout = new CarouselLayout {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.FillAndExpand,
                IndicatorStyle = CarouselLayout.IndicatorStyleEnum.None,
                ItemTemplate = new DataTemplate(typeof(ImageTemplate))
            };

            return _carouselLayout;
        }
コード例 #3
0
        protected override void OnElementChanged(VisualElementChangedEventArgs e)
        {
            base.OnElementChanged(e);

            if (e.OldElement != null) return;

            _view = (CarouselLayout)e.NewElement;
            _native = (UIScrollView)NativeView;
            _native.Scrolled += NativeScrolled;

            e.NewElement.PropertyChanged += ElementPropertyChanged;
        }