Class SfCardLayout
Represents a class for card layout, which contains card views as children.
Inherited Members
Namespace: Syncfusion.Maui.Cards
Assembly: Syncfusion.Maui.Cards.dll
Syntax
public class SfCardLayout : CardLayout, IPanGestureListener, ITapGestureListener, IGestureListener
Constructors
SfCardLayout()
Initializes a new instance of the SfCardLayout class.
Declaration
public SfCardLayout()
Fields
HorizontalCardSpacingProperty
Identifies the HorizontalCardSpacing dependency property.
Declaration
public static readonly BindableProperty HorizontalCardSpacingProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for HorizontalCardSpacing dependency property. |
ShowSwipedCardProperty
Identifies the ShowSwipedCard dependency property.
Declaration
public static readonly BindableProperty ShowSwipedCardProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for ShowSwipedCard dependency property. |
SwipeDirectionProperty
Identifies the SwipeDirection dependency property.
Declaration
public static readonly BindableProperty SwipeDirectionProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for SwipeDirection dependency property. |
VerticalCardSpacingProperty
Identifies the VerticalCardSpacing dependency property.
Declaration
public static readonly BindableProperty VerticalCardSpacingProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for VerticalCardSpacing dependency property. |
VisibleIndexProperty
Identifies the VisibleIndex dependency property.
Declaration
public static readonly BindableProperty VisibleIndexProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for VisibleIndex dependency property. |
Properties
HorizontalCardSpacing
Gets or sets the horizontal spacing between the cards.
Declaration
public int HorizontalCardSpacing { get; set; }
Property Value
| Type |
|---|
| System.Int32 |
ShowSwipedCard
Gets or sets a value indicating whether to show the swiped card or not.
Declaration
public bool ShowSwipedCard { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
SwipeDirection
Gets or sets the swipe direction of the card layout.
Declaration
public CardSwipeDirection SwipeDirection { get; set; }
Property Value
| Type |
|---|
| CardSwipeDirection |
VerticalCardSpacing
Gets or sets the vertical spacing between the cards.
Declaration
public int VerticalCardSpacing { get; set; }
Property Value
| Type |
|---|
| System.Int32 |
VisibleIndex
Gets or sets the visible card index of the card layout.
Declaration
public Nullable<int> VisibleIndex { get; set; }
Property Value
| Type |
|---|
| System.Nullable<System.Int32> |
Remarks
If we set the invalid index value, then the card layout will display the last card as visible card.
Methods
Backward()
Move to previous card with animation.
Declaration
public void Backward()
Forward()
Move to next card with animation.
Declaration
public void Forward()
Events
Tapped
Occurs whenever the card layout is tapped.
Declaration
public event EventHandler<TappedEventArgs> Tapped
Event Type
| Type |
|---|
| System.EventHandler<Microsoft.Maui.Controls.TappedEventArgs> |
VisibleIndexChanged
Occurs when the card is swiped.
Declaration
public event EventHandler<CardVisibleIndexChangedEventArgs> VisibleIndexChanged
Event Type
| Type |
|---|
| System.EventHandler<CardVisibleIndexChangedEventArgs> |
VisibleIndexChanging
Occurs when the card is swiping.
Declaration
public event EventHandler<CardVisibleIndexChangingEventArgs> VisibleIndexChanging
Event Type
| Type |
|---|
| System.EventHandler<CardVisibleIndexChangingEventArgs> |