Class SfShimmer
Represents a loading indicator control that provides modern animations when data is being loaded.
Implements
Inherited Members
Namespace: Syncfusion.Maui.Toolkit.Shimmer
Assembly: Syncfusion.Maui.Toolkit.dll
Syntax
public class SfShimmer : SfContentView, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement, ISemanticsProvider, IShimmer, IParentThemeElement, IThemeElement
Constructors
SfShimmer()
Initializes a new instance of the SfShimmer class.
Declaration
public SfShimmer()
Fields
AnimationDurationProperty
Identifies the AnimationDuration bindable property.
Declaration
public static readonly BindableProperty AnimationDurationProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The AnimationDuration property determines the duration of wave animation of the SfShimmer.
CustomViewProperty
Identifies the CustomView bindable property.
Declaration
public static readonly BindableProperty CustomViewProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The CustomView property is used to customize the view using framework elements. SfShimmer.
FillProperty
Identifies the Fill bindable property.
Declaration
public static readonly BindableProperty FillProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
IsActiveProperty
Identifies the IsActive bindable property.
Declaration
public static readonly BindableProperty IsActiveProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
RepeatCountProperty
Identifies the RepeatCount bindable property.
Declaration
public static readonly BindableProperty RepeatCountProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The RepeatCount property determines the number of times the built-in view animation is repeated in the SfShimmer.
TypeProperty
Identifies the Type bindable property.
Declaration
public static readonly BindableProperty TypeProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
WaveColorProperty
Identifies the WaveColor bindable property.
Declaration
public static readonly BindableProperty WaveColorProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
WaveDirectionProperty
Identifies the WaveDirection bindable property.
Declaration
public static readonly BindableProperty WaveDirectionProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The WaveDirection property determines the wave direction in SfShimmer.
WaveWidthProperty
Identifies the WaveWidth bindable property.
Declaration
public static readonly BindableProperty WaveWidthProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
Properties
AnimationDuration
Gets or sets the duration of the wave animation in milliseconds.
Declaration
public double AnimationDuration { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value of AnimationDuration is 1000 milliseconds. |
Examples
The following code demonstrates how to use the AnimationDuration property in the SfShimmer.
CustomView
Gets or sets the custom view that is used for the loading view.
Declaration
public View CustomView { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.View | The default value of CustomView is null. |
Examples
The following code demonstrates how to use the CustomView property in the SfShimmer.
<shimmer:SfShimmer x:Name="Shimmer">
<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>
Fill
Gets or sets the background color of the shimmer view.
Declaration
public Brush Fill { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.Brush | The default value of Fill is "#F3EDF6". |
Remarks
If the brush is a gradient brush, it only applies the first color.
Examples
The following code demonstrates how to use the Fill property in the Shimmer.
IsActive
Gets or sets a value indicating whether to load the actual content of the SfShimmer.
Declaration
public bool IsActive { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value of IsActive is true. |
Examples
The following code demonstrates how to use the IsActive property in the SfShimmer.
RepeatCount
Gets or sets the number of times the built-in view should be repeated.
Declaration
public int RepeatCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The default value of RepeatCount is 1. |
Remarks
The repeat count is applicable only to the built-in views and not to custom views.
Examples
The following code demonstrates how to use the RepeatCount property in the SfShimmer.
Type
Gets or sets the built-in shimmer view type.
Declaration
public ShimmerType Type { get; set; }
Property Value
Type | Description |
---|---|
ShimmerType | The default value of Type is CirclePersona. |
Examples
The following code demonstrates how to use the Type property in the SfShimmer.
WaveColor
Gets or sets the shimmer wave color.
Declaration
public Color WaveColor { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Graphics.Color | The default value of WaveColor is "#FFFBFE". |
Examples
The following code demonstrates how to use the WaveColor property in the SfShimmer.
WaveDirection
Gets or sets the animation direction for Shimmer.
Declaration
public ShimmerWaveDirection WaveDirection { get; set; }
Property Value
Type | Description |
---|---|
ShimmerWaveDirection | The default value of WaveDirection is Default. |
Examples
The following code demonstrates how to use the WaveDirection property in the SfShimmer.
WaveWidth
Gets or sets the width of the wave.
Declaration
public double WaveWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value of WaveWidth is 200. |
Examples
The following code demonstrates how to use the WaveWidth property in the SfShimmer.