示例#1
0
        protected override void OnElementPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs changedProperty)
        {
            base.OnElementPropertyChanged(sender, changedProperty);

            if (changedProperty.Is(Xamarin.Forms.ItemsView.ItemsSourceProperty))
            {
                UpdateItemsSource();
            }
            else if (changedProperty.Is(Xamarin.Forms.ItemsView.ItemTemplateProperty))
            {
                UpdateItemTemplate();
            }
            else if (changedProperty.Is(Xamarin.Forms.ItemsView.HorizontalScrollBarVisibilityProperty))
            {
                UpdateHorizontalScrollBarVisibility();
            }
            else if (changedProperty.Is(Xamarin.Forms.ItemsView.VerticalScrollBarVisibilityProperty))
            {
                UpdateVerticalScrollBarVisibility();
            }
            else if (changedProperty.IsOneOf(Xamarin.Forms.ItemsView.EmptyViewProperty,
                                             Xamarin.Forms.ItemsView.EmptyViewTemplateProperty))
            {
                UpdateEmptyView();
            }
        }
示例#2
0
 protected override void HandleLayoutPropertyChanged(System.ComponentModel.PropertyChangedEventArgs property)
 {
     if (property.Is(LinearItemsLayout.ItemSpacingProperty))
     {
         UpdateItemSpacing();
     }
     else if (property.Is(ItemsLayout.SnapPointsTypeProperty))
     {
         UpdateSnapPointsType();
     }
     else if (property.Is(ItemsLayout.SnapPointsAlignmentProperty))
     {
         UpdateSnapPointsAlignment();
     }
 }
示例#3
0
        protected override void OnElementPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs changedProperty)
        {
            base.OnElementPropertyChanged(sender, changedProperty);

            if (changedProperty.IsOneOf(CarouselView.ItemsSourceProperty, LinearItemsLayout.ItemSpacingProperty))
            {
                UpdateItemsSource();
            }
            else if (changedProperty.Is(CarouselView.ItemTemplateProperty))
            {
                UpdateItemTemplate();
            }
            else if (changedProperty.Is(CarouselView.PeekAreaInsetsProperty))
            {
                UpdatePeekAreaInsets();
            }
            else if (changedProperty.Is(CarouselView.IsSwipeEnabledProperty))
            {
                UpdateIsSwipeEnabled();
            }
            else if (changedProperty.Is(CarouselView.IsBounceEnabledProperty))
            {
                UpdateIsBounceEnabled();
            }
            else if (changedProperty.Is(CarouselView.PositionProperty))
            {
                UpdateFromPosition();
            }
            else if (changedProperty.Is(CarouselView.CurrentItemProperty))
            {
                UpdateFromCurrentItem();
            }
            else if (changedProperty.Is(CarouselView.LoopProperty))
            {
                UpdateLoop();
            }
        }