109 references to CarouselView
Microsoft.Maui.Controls (109)
Handlers\Items\CarouselViewHandler.cs (6)
15
public static PropertyMapper<
CarouselView
, CarouselViewHandler> Mapper = new(ItemsViewMapper)
20
[Controls.
CarouselView
.IsSwipeEnabledProperty.PropertyName] = MapIsSwipeEnabled,
21
[Controls.
CarouselView
.PeekAreaInsetsProperty.PropertyName] = MapPeekAreaInsets,
22
[Controls.
CarouselView
.IsBounceEnabledProperty.PropertyName] = MapIsBounceEnabled,
23
[Controls.
CarouselView
.PositionProperty.PropertyName] = MapPosition,
24
[Controls.
CarouselView
.CurrentItemProperty.PropertyName] = MapCurrentItem
Handlers\Items\CarouselViewHandler.iOS.cs (8)
7
public partial class CarouselViewHandler : ItemsViewHandler<
CarouselView
>
11
protected override CarouselViewController CreateController(
CarouselView
newElement, ItemsViewLayout layout)
38
public static void MapIsSwipeEnabled(CarouselViewHandler handler,
CarouselView
carouselView)
43
public static void MapIsBounceEnabled(CarouselViewHandler handler,
CarouselView
carouselView)
48
public static void MapPeekAreaInsets(CarouselViewHandler handler,
CarouselView
carouselView)
54
public static void MapCurrentItem(CarouselViewHandler handler,
CarouselView
carouselView)
59
public static void MapPosition(CarouselViewHandler handler,
CarouselView
carouselView)
69
public static void MapLoop(CarouselViewHandler handler,
CarouselView
carouselView)
Handlers\Items\iOS\CarouselViewController.cs (27)
16
public class CarouselViewController : ItemsViewController<
CarouselView
>
20
protected readonly
CarouselView
Carousel;
35
public CarouselViewController(
CarouselView
itemsView, ItemsViewLayout layout) : base(itemsView, layout)
75
VisualStateManager.GoToState(element,
CarouselView
.DefaultItemVisualState);
135
if (ItemsView is
CarouselView
carousel)
160
if (InitialPositionSet && ItemsView is
CarouselView
carousel)
162
carousel.SetValueFromRenderer(
CarouselView
.CurrentItemProperty, null);
163
carousel.SetValueFromRenderer(
CarouselView
.PositionProperty, 0);
223
void TearDown(
CarouselView
carouselView)
236
void Setup(
CarouselView
carouselView)
250
if (ItemsView is
CarouselView
carousel)
308
if (ItemsView is not
CarouselView
carousel)
360
ItemsView?.SetValueFromRenderer(
CarouselView
.CurrentItemProperty, null);
407
if (ItemsView is not
CarouselView
carousel)
426
if (ItemsView is not
CarouselView
carousel)
452
if (!InitialPositionSet || position == -1 || ItemsView is not
CarouselView
carousel)
466
carousel.SetValueFromRenderer(
CarouselView
.PositionProperty, position);
478
ItemsView?.SetValueFromRenderer(
CarouselView
.CurrentItemProperty, item);
487
if (ItemsView is not
CarouselView
carousel)
511
if (ItemsView is not
CarouselView
carousel)
536
if (ItemsView is not
CarouselView
carousel)
591
if (ItemsView is not
CarouselView
carousel)
622
VisualStateManager.GoToState(itemView,
CarouselView
.CurrentItemVisualState);
626
VisualStateManager.GoToState(itemView,
CarouselView
.PreviousItemVisualState);
630
VisualStateManager.GoToState(itemView,
CarouselView
.NextItemVisualState);
634
VisualStateManager.GoToState(itemView,
CarouselView
.DefaultItemVisualState);
649
VisualStateManager.GoToState(itemView,
CarouselView
.DefaultItemVisualState);
Handlers\Items\iOS\CarouselViewDelegator.cs (1)
8
public class CarouselViewDelegator : ItemsViewDelegator<
CarouselView
, CarouselViewController>
Handlers\Items\iOS\CarouselViewLayout.cs (5)
10
readonly WeakReference<
CarouselView
> _carouselView;
14
public CarouselViewLayout(ItemsLayout itemsLayout,
CarouselView
carouselView) : base(itemsLayout)
22
if (!_carouselView.TryGetTarget(out
var
carouselView))
49
if (!_carouselView.TryGetTarget(out
var
carouselView))
65
if (!_carouselView.TryGetTarget(out
var
carouselView))
Handlers\Items2\CarouselViewHandler2.iOS.cs (14)
23
public static PropertyMapper<
CarouselView
, CarouselViewHandler2> Mapper = new(ItemsViewMapper)
26
[Controls.
CarouselView
.IsSwipeEnabledProperty.PropertyName] = MapIsSwipeEnabled,
27
[Controls.
CarouselView
.PeekAreaInsetsProperty.PropertyName] = MapPeekAreaInsets,
28
[Controls.
CarouselView
.IsBounceEnabledProperty.PropertyName] = MapIsBounceEnabled,
29
[Controls.
CarouselView
.PositionProperty.PropertyName] = MapPosition,
30
[Controls.
CarouselView
.CurrentItemProperty.PropertyName] = MapCurrentItem
34
public partial class CarouselViewHandler2 : ItemsViewHandler2<
CarouselView
>
36
protected override CarouselViewController2 CreateController(
CarouselView
newElement, UICollectionViewLayout layout)
175
public static void MapIsSwipeEnabled(CarouselViewHandler2 handler,
CarouselView
carouselView)
180
public static void MapIsBounceEnabled(CarouselViewHandler2 handler,
CarouselView
carouselView)
185
public static void MapPeekAreaInsets(CarouselViewHandler2 handler,
CarouselView
carouselView)
190
public static void MapCurrentItem(CarouselViewHandler2 handler,
CarouselView
carouselView)
195
public static void MapPosition(CarouselViewHandler2 handler,
CarouselView
carouselView)
205
public static void MapLoop(CarouselViewHandler2 handler,
CarouselView
carouselView)
Handlers\Items2\iOS\CarouselViewController2.cs (26)
14
public class CarouselViewController2 : ItemsViewController2<
CarouselView
>
25
public CarouselViewController2(
CarouselView
itemsView, UICollectionViewLayout layout) : base(itemsView, layout)
46
VisualStateManager.GoToState(element,
CarouselView
.DefaultItemVisualState);
102
if (InitialPositionSet && ItemsView is
CarouselView
carousel)
104
carousel.SetValueFromRenderer(
CarouselView
.CurrentItemProperty, null);
105
carousel.SetValueFromRenderer(
CarouselView
.PositionProperty, 0);
144
void TearDown(
CarouselView
carouselView)
156
void Setup(
CarouselView
carouselView)
167
if (ItemsView is
CarouselView
carousel)
221
if (ItemsView is not
CarouselView
carousel)
297
ItemsView?.SetValueFromRenderer(
CarouselView
.CurrentItemProperty, null);
350
if (ItemsView is not
CarouselView
carousel)
369
if (ItemsView is not
CarouselView
carousel)
390
if (ItemsView is not
CarouselView
carousel)
405
ItemsView.SetValueFromRenderer(
CarouselView
.PositionProperty, position);
412
if (ItemsView is not
CarouselView
carousel)
423
ItemsView?.SetValueFromRenderer(
CarouselView
.CurrentItemProperty, item);
432
if (ItemsView is not
CarouselView
carousel)
456
if (ItemsView is not
CarouselView
carousel)
476
if (ItemsView is not
CarouselView
carousel)
543
if (ItemsView is not
CarouselView
carousel)
574
VisualStateManager.GoToState(itemView,
CarouselView
.CurrentItemVisualState);
578
VisualStateManager.GoToState(itemView,
CarouselView
.PreviousItemVisualState);
582
VisualStateManager.GoToState(itemView,
CarouselView
.NextItemVisualState);
586
VisualStateManager.GoToState(itemView,
CarouselView
.DefaultItemVisualState);
601
VisualStateManager.GoToState(itemView,
CarouselView
.DefaultItemVisualState);
Handlers\Items2\iOS\CarouselViewDelegator2.cs (1)
8
public class CarouselViewDelegator2 : ItemsViewDelegator2<
CarouselView
, CarouselViewController2>
Hosting\AppHostBuilderExtensions.cs (1)
65
handlersCollection.AddHandler<
CarouselView
, CarouselViewHandler>();
Items\CarouselView.cs (20)
27
public static readonly BindableProperty LoopProperty = BindableProperty.Create(nameof(Loop), typeof(bool), typeof(
CarouselView
), true, BindingMode.OneTime);
37
public static readonly BindableProperty PeekAreaInsetsProperty = BindableProperty.Create(nameof(PeekAreaInsets), typeof(Thickness), typeof(
CarouselView
), default(Thickness));
46
static readonly BindablePropertyKey VisibleViewsPropertyKey = BindableProperty.CreateReadOnly(nameof(VisibleViews), typeof(ObservableCollection<View>), typeof(
CarouselView
), null, defaultValueCreator: (b) => new ObservableCollection<View>());
54
static readonly BindablePropertyKey IsDraggingPropertyKey = BindableProperty.CreateReadOnly(nameof(IsDragging), typeof(bool), typeof(
CarouselView
), false);
64
BindableProperty.Create(nameof(IsBounceEnabled), typeof(bool), typeof(
CarouselView
), true);
75
BindableProperty.Create(nameof(IsSwipeEnabled), typeof(bool), typeof(
CarouselView
), true);
86
BindableProperty.Create(nameof(IsScrollAnimated), typeof(bool), typeof(
CarouselView
), true);
97
BindableProperty.Create(nameof(CurrentItem), typeof(object), typeof(
CarouselView
), default, BindingMode.TwoWay,
102
BindableProperty.Create(nameof(CurrentItemChangedCommand), typeof(ICommand), typeof(
CarouselView
));
106
BindableProperty.Create(nameof(CurrentItemChangedCommandParameter), typeof(object), typeof(
CarouselView
));
131
var
carouselView = (
CarouselView
)bindable;
154
BindableProperty.Create(nameof(Position), typeof(int), typeof(
CarouselView
), default(int), BindingMode.TwoWay,
159
BindableProperty.Create(nameof(PositionChangedCommand), typeof(ICommand), typeof(
CarouselView
));
164
typeof(
CarouselView
));
207
static void LinkToIndicatorView(
CarouselView
carouselView, IndicatorView indicatorView)
212
indicatorView.SetBinding(IndicatorView.PositionProperty, static (
CarouselView
carousel) => carousel.Position, source: carouselView);
213
indicatorView.SetBinding(IndicatorView.ItemsSourceProperty, static (
CarouselView
carousel) => carousel.ItemsSource, source: carouselView);
243
var
carousel = (
CarouselView
)bindable;