Class Carousel
An items control that displays its items as pages that fill the control.
public class Carousel : SelectingItemsControl, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue, IChildIndexProvider
- Inheritance
-
Carousel
- Implements
- Inherited Members
- Extension Methods
Constructors
Carousel()
public Carousel()
Fields
PageTransitionProperty
Defines the PageTransition property.
public static readonly StyledProperty<IPageTransition?> PageTransitionProperty
Field Value
Properties
PageTransition
Gets or sets the transition to use when moving between pages.
public IPageTransition? PageTransition { get; set; }
Property Value
Methods
ArrangeOverride(Size)
Positions child elements as part of a layout pass.
protected override Size ArrangeOverride(Size finalSize)
Parameters
finalSize
SizeThe size available to the control.
Returns
- Size
The actual size used.
Next()
Moves to the next item in the carousel.
public void Next()
OnApplyTemplate(TemplateAppliedEventArgs)
Called when the control's template is applied. In simple terms, this means the method is called just before the control is displayed.
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
Parameters
e
TemplateAppliedEventArgsThe event args.
OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
Called when a avalonia property changes on the object.
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
Parameters
change
AvaloniaPropertyChangedEventArgsThe property change details.
Previous()
Moves to the previous item in the carousel.
public void Previous()