menu

MAUI Toolkit

  • User Guide
  • Demos
  • Support
Class SfCardView - MAUI-ToolKit API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfCardView

    Represents the SfCardView control that is used to display the content in a card view.

    Inheritance
    System.Object
    SfView
    SfContentView
    SfCardView
    Implements
    IDrawableLayout
    Microsoft.Maui.Graphics.IDrawable
    Microsoft.Maui.IAbsoluteLayout
    Microsoft.Maui.ILayout
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IContainer
    System.Collections.Generic.IList<Microsoft.Maui.IView>
    System.Collections.Generic.ICollection<Microsoft.Maui.IView>
    System.Collections.Generic.IEnumerable<Microsoft.Maui.IView>
    System.Collections.IEnumerable
    Microsoft.Maui.ISafeAreaView
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Microsoft.Maui.IVisualTreeElement
    Inherited Members
    SfContentView.Content
    SfContentView.ContentProperty
    SfView.Children
    SfView.ClipToBounds
    SfView.Padding
    Namespace: Syncfusion.Maui.Toolkit.Cards
    Assembly: Syncfusion.Maui.Toolkit.dll
    Syntax
    public class SfCardView : SfContentView, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement, ISemanticsProvider, IPanGestureListener, IGestureListener, IParentThemeElement, IThemeElement

    Constructors

    SfCardView()

    Initializes a new instance of the SfCardView class.

    Declaration
    public SfCardView()

    Fields

    BorderColorProperty

    Identifies the BorderColor dependency property.

    Declaration
    public static readonly BindableProperty BorderColorProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for BorderColor dependency property.

    BorderWidthProperty

    Identifies the BorderWidth dependency property.

    Declaration
    public static readonly BindableProperty BorderWidthProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for BorderWidth dependency property.

    CornerRadiusProperty

    Identifies the CornerRadius dependency property.

    Declaration
    public static readonly BindableProperty CornerRadiusProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for CornerRadius dependency property.

    FadeOutOnSwipingProperty

    Identifies the FadeOutOnSwiping dependency property.

    Declaration
    public static readonly BindableProperty FadeOutOnSwipingProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for FadeOutOnSwiping dependency property.

    IndicatorColorProperty

    Identifies the IndicatorColor dependency property.

    Declaration
    public static readonly BindableProperty IndicatorColorProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for IndicatorColor dependency property.

    IndicatorPositionProperty

    Identifies the IndicatorPosition dependency property.

    Declaration
    public static readonly BindableProperty IndicatorPositionProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for IndicatorPosition dependency property.

    IndicatorThicknessProperty

    Identifies the IndicatorThickness dependency property.

    Declaration
    public static readonly BindableProperty IndicatorThicknessProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for IndicatorThickness dependency property.

    IsDismissedProperty

    Identifies the IsDismissed dependency property.

    Declaration
    public static readonly BindableProperty IsDismissedProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for IsDismissed dependency property.

    SwipeToDismissProperty

    Identifies the SwipeToDismiss dependency property.

    Declaration
    public static readonly BindableProperty SwipeToDismissProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for SwipeToDismiss dependency property.

    Properties

    BorderColor

    Gets or sets the border color of the card view.

    Declaration
    public Color BorderColor { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Graphics.Color

    The default value of BorderColor is "#CAC4D0".

    Examples

    The following code demonstrates, how to use the BorderColor property in the card view.

    • XAML
    • C#
    <Cards:SfCardView x:Name="CardView"
                      BorderColor="Blue">
    </Cards:SfCardView>
    CardView.BorderColor = Colors.Blue;

    BorderWidth

    Gets or sets the border width of the card view.

    Declaration
    public double BorderWidth { get; set; }
    Property Value
    Type Description
    System.Double

    The default value of BorderWidth is 1d.

    Examples

    The following code demonstrates, how to use the BorderWidth property in the card view.

    • XAML
    • C#
    <Cards:SfCardView x:Name="CardView"
                      BorderWidth="10">
    </Cards:SfCardView>
    CardView.BorderWidth = 10;

    CornerRadius

    Gets or sets the corner radius of the card view.

    Declaration
    public CornerRadius CornerRadius { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.CornerRadius

    The default value of CornerRadius is 5.

    Examples

    The following code demonstrates, how to use the CornerRadius property in the card view.

    • XAML
    • C#
    <Cards:SfCardView x:Name="CardView"
                      CornerRadius="10">
    </Cards:SfCardView>
    CardView.CornerRadius = 10;

    FadeOutOnSwiping

    Gets or sets a value indicating whether the card view fade out or not while swiping.

    Declaration
    public bool FadeOutOnSwiping { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value of FadeOutOnSwiping is true.

    Examples

    The following code demonstrates, how to use the FadeOutOnSwiping property in the card view.

    • XAML
    • C#
    <Cards:SfCardView x:Name="CardView"
                      FadeOutOnSwiping="False">
    </Cards:SfCardView>
    CardView.FadeOutOnSwiping = false;

    IndicatorColor

    Gets or sets the indicator color of the card view.

    Declaration
    public Color IndicatorColor { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Graphics.Color

    The default value of IndicatorColor is Transparent.

    Examples

    The following code demonstrates, how to use the IndicatorColor property in the card view.

    • XAML
    • C#
    <Cards:SfCardView x:Name="CardView"
                      IndicatorColor="Blue">
    </Cards:SfCardView>
    CardView.IndicatorColor = Colors.Blue;

    IndicatorPosition

    Gets or sets the indicator position of the card view.

    Declaration
    public CardIndicatorPosition IndicatorPosition { get; set; }
    Property Value
    Type Description
    CardIndicatorPosition

    The default value of IndicatorPosition is CardIndicatorPosition.Left.

    Examples

    The following code demonstrates, how to use the IndicatorPosition property in the card view.

    • XAML
    • C#
    <Cards:SfCardView x:Name="CardView"
                      IndicatorPosition="Right">
    </Cards:SfCardView>
    CardView.IndicatorPosition = CardIndicatorPosition.Right;

    IndicatorThickness

    Gets or sets the indicator thickness of the card view.

    Declaration
    public double IndicatorThickness { get; set; }
    Property Value
    Type Description
    System.Double

    The default value of IndicatorThickness is 0d.

    Examples

    The following code demonstrates, how to use the IndicatorThickness property in the card view.

    • XAML
    • C#
    <Cards:SfCardView x:Name="CardView"
                      IndicatorThickness="10">
    </Cards:SfCardView>
    CardView.IndicatorThickness = 10;

    IsDismissed

    Gets or sets a value indicating whether the card view is dismissed or not.

    Declaration
    public bool IsDismissed { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value of IsDismissed is false.

    Examples

    The following code demonstrates, how to use the IsDismissed property in the card view.

    • XAML
    • C#
    <Cards:SfCardView x:Name="CardView"
                      IsDismissed="True">
    </Cards:SfCardView>
    CardView.IsDismissed = true;

    SwipeToDismiss

    Gets or sets a value indicating whether the card view can be dismissed by swiping.

    Declaration
    public bool SwipeToDismiss { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value of SwipeToDismiss is false.

    Examples

    The following code demonstrates, how to use the SwipeToDismiss property in the card view.

    • XAML
    • C#
    <Cards:SfCardView x:Name="CardView"
                      SwipeToDismiss="True">
    </Cards:SfCardView>
    CardView.SwipeToDismiss = true;

    Methods

    ArrangeContent(Rect)

    Method to arrange the content of the card view.

    Declaration
    protected override Size ArrangeContent(Rect bounds)
    Parameters
    Type Name Description
    Microsoft.Maui.Graphics.Rect bounds

    The available size

    Returns
    Type Description
    Microsoft.Maui.Graphics.Size

    The actual size

    Overrides
    Syncfusion.Maui.Toolkit.SfView.ArrangeContent(Microsoft.Maui.Graphics.Rect)

    MeasureContent(Double, Double)

    Method to measure the content of the card view.

    Declaration
    protected override Size MeasureContent(double widthConstraint, double heightConstraint)
    Parameters
    Type Name Description
    System.Double widthConstraint

    The available width

    System.Double heightConstraint

    The available height

    Returns
    Type Description
    Microsoft.Maui.Graphics.Size

    The actual size

    Overrides
    Syncfusion.Maui.Toolkit.SfView.MeasureContent(System.Double, System.Double)

    OnDraw(ICanvas, RectF)

    Method to draw the card view.

    Declaration
    protected override void OnDraw(ICanvas canvas, RectF dirtyRect)
    Parameters
    Type Name Description
    Microsoft.Maui.Graphics.ICanvas canvas

    The draw canvas

    Microsoft.Maui.Graphics.RectF dirtyRect

    The rectangle

    Overrides
    Syncfusion.Maui.Toolkit.SfView.OnDraw(Microsoft.Maui.Graphics.ICanvas, Microsoft.Maui.Graphics.RectF)

    Events

    Dismissed

    Occurs whenever the card view dismissed.

    Declaration
    public event EventHandler<CardDismissedEventArgs> Dismissed
    Event Type
    Type
    System.EventHandler<CardDismissedEventArgs>

    Dismissing

    Occurs whenever the card view is dismissing.

    Declaration
    public event EventHandler<CardDismissingEventArgs> Dismissing
    Event Type
    Type
    System.EventHandler<CardDismissingEventArgs>

    Implements

    IDrawableLayout
    Microsoft.Maui.Graphics.IDrawable
    Microsoft.Maui.IAbsoluteLayout
    Microsoft.Maui.ILayout
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IContainer
    System.Collections.Generic.IList<>
    System.Collections.Generic.ICollection<>
    System.Collections.Generic.IEnumerable<>
    System.Collections.IEnumerable
    Microsoft.Maui.ISafeAreaView
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Microsoft.Maui.IVisualTreeElement
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved