menu

MAUI Toolkit

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

    Show / Hide Table of Contents

    Class ShimmerView

    Represents a view used to achieve a custom shimmer effect.

    Inheritance
    System.Object
    SfView
    ShimmerView
    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
    SfView.Children
    SfView.ClipToBounds
    SfView.Padding
    Namespace: Syncfusion.Maui.Toolkit.Shimmer
    Assembly: Syncfusion.Maui.Toolkit.dll
    Syntax
    public class ShimmerView : SfView, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement, ISemanticsProvider

    Constructors

    ShimmerView()

    Declaration
    public ShimmerView()

    Fields

    ShapeTypeProperty

    Identifies the ShapeType bindable property.

    Declaration
    public static readonly BindableProperty ShapeTypeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    The ShapeType property determines the shape type of the SfShimmer.

    Properties

    ShapeType

    Gets or sets the shape for the ShimmerView. The default value is Rectangle.

    Declaration
    public ShimmerShapeType ShapeType { get; set; }
    Property Value
    Type
    ShimmerShapeType
    Examples

    The following code demonstrates how to use the ShapeType property in the SfShimmer.

    • XAML
    • C#
    <shimmer:SfShimmer x:Name="Shimmer" 
                       Type="Custom">
        <shimmer:SfShimmer.CustomView>
            <Grid HeightRequest="50" WidthRequest="200">
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.25*"/>
                    <ColumnDefinition Width="0.75*"/>
                </Grid.ColumnDefinitions>
    
                <shimmer:ShimmerView ShapeType="Circle" Grid.RowSpan="2"/>
                <shimmer:ShimmerView Grid.Column="1" Margin="5"/>
                <shimmer:ShimmerView ShapeType="RoundedRectangle" Grid.Row="1" Grid.Column="1" Margin="5"/>
            </Grid>
        </shimmer:SfShimmer.CustomView>
    </shimmer:SfShimmer>
    Grid grid = new Grid
    {
        HeightRequest = 50, 
        WidthRequest = 200,
        RowDefinitions =
        {
            new RowDefinition(),
            new RowDefinition(),
        },
        ColumnDefinitions =
        {
            new ColumnDefinition { Width = new GridLength(0.25, GridUnitType.Star) },
            new ColumnDefinition { Width = new GridLength(0.75, GridUnitType.Star) }
        }
    };
    
    ShimmerView circleView = new ShimmerView() { ShapeType = ShimmerShapeType.Circle};
    grid.SetRowSpan(circleView, 2);
    grid.Add(circleView);
    grid.Add(new ShimmerView { Margin = 5 }, 1);
    grid.Add(new ShimmerView { Margin = 5, ShapeType = ShimmerShapeType.RoundedRectangle }, 1, 1);
    Shimmer.Type = ShimmerType.Custom;
    Shimmer.CustomView = grid;

    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