Class SfBusyIndicator
SfBusyIndicator is a indicator to show a busy status of app loading, data processing etc
Implements
Inherited Members
Namespace: Syncfusion.Maui.Core
Assembly: Syncfusion.Maui.Core.dll
Syntax
public class SfBusyIndicator : SfContentView, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement, ISemanticsProvider, ITextElement, IParentThemeElement, IThemeElement
Examples
The following example show how to initialize the busy indicator.
<sf:SfBusyIndicator IsRunning="True" AnimationType="CircularMaterial" Title="BusyIndicator"/>
Constructors
SfBusyIndicator()
Initializes a new instance of the SfBusyIndicator class.
Declaration
public SfBusyIndicator()
Fields
AnimationTypeProperty
Identifies the AnimationType bindable property.
Declaration
public static readonly BindableProperty AnimationTypeProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for AnimationType bindable property. |
DurationFactorProperty
Identifies the DurationFactor bindable property.
Declaration
public static readonly BindableProperty DurationFactorProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for DurationFactor bindable property. |
FontAttributesProperty
Identifies the FontAttributes bindable property.
Declaration
public static readonly BindableProperty FontAttributesProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for FontAttributes bindable property. |
FontAutoScalingEnabledProperty
Identifies the FontAutoScalingEnabled bindable property.
Declaration
public static readonly BindableProperty FontAutoScalingEnabledProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for FontAutoScalingEnabled bindable property. |
FontFamilyProperty
Identifies the FontFamily bindable property.
Declaration
public static readonly BindableProperty FontFamilyProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for FontFamily bindable property. |
FontSizeProperty
Identifies the FontSize bindable property.
Declaration
public static readonly BindableProperty FontSizeProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for FontSize bindable property. |
IndicatorColorProperty
Identifies the IndicatorColor bindable property.
Declaration
public static readonly BindableProperty IndicatorColorProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for IndicatorColor bindable property. |
IsRunningProperty
Identifies the IsRunning bindable property.
Declaration
public static readonly BindableProperty IsRunningProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for IsRunning bindable property. |
OverlayFillProperty
Identifies the OverlayFill bindable property.
Declaration
public static readonly BindableProperty OverlayFillProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for OverlayFill bindable property. |
SizeFactorProperty
Identifies the SizeFactor bindable property.
Declaration
public static readonly BindableProperty SizeFactorProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for SizeFactor bindable property. |
TextColorProperty
Identifies the TextColor bindable property.
Declaration
public static readonly BindableProperty TextColorProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for TextColor bindable property. |
TitlePlacementProperty
Identifies the TitlePlacement bindable property.
Declaration
public static readonly BindableProperty TitlePlacementProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for TitlePlacement bindable property. |
TitleProperty
Identifies the Title bindable property.
Declaration
public static readonly BindableProperty TitleProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for Title bindable property. |
TitleSpacingProperty
Identifies the TitleSpacing bindable property.
Declaration
public static readonly BindableProperty TitleSpacingProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for TitleSpacing bindable property. |
Properties
AnimationType
Gets or sets the animation type of the indicator.
Declaration
public AnimationType AnimationType { get; set; }
Property Value
Type | Description |
---|---|
AnimationType | Specifies the animation type of the indicator. The default value is CircularMaterial |
Examples
<sf:SfBusyIndicator IsRunning="True"
AnimationType="LinearMaterial"
Title="BusyIndicator"
IndicatorColor="Aqua"
OverlayFill="#ff8000"/>
DurationFactor
Gets or sets the duration of the indicator animation.
Declaration
public double DurationFactor { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Specifies the duration of the indicator animation. The default value is 0.5d. |
Examples
<sf:SfBusyIndicator IsRunning="True"
AnimationType="CircularMaterial"
Title="BusyIndicator"
DurationFactor="1"/>
FontAttributes
Enumerates values that describe font styles of title.
Declaration
public FontAttributes FontAttributes { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.FontAttributes | Specifies the font styles of the title. The default value is None. |
Examples
<sf:SfBusyIndicator IsRunning="True"
AnimationType="CircularMaterial"
Title="BusyIndicator"
FontAttributes="Bold"/>
FontAutoScalingEnabled
Gets or sets a value that Determines whether or not the font of the control should scale automatically according to the operating system settings.
Declaration
public bool FontAutoScalingEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | It accepts Boolean values, and the default value is false. |
FontFamily
Gets or sets the font family for the title of the indicator.
Declaration
public string FontFamily { get; set; }
Property Value
Type | Description |
---|---|
System.String | Specifies the font family for the title of the indicator. |
Examples
<sf:SfBusyIndicator IsRunning="True"
AnimationType="CircularMaterial"
Title="BusyIndicator"
FontFamily="Serif"/>
FontSize
Gets or sets the font size for the title of the indicator.
Declaration
public double FontSize { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Specifies the font size for the title. The default value is 12d. |
Examples
<sf:SfBusyIndicator IsRunning="True"
AnimationType="CircularMaterial"
Title="BusyIndicator"
FontSize="20"/>
IndicatorColor
Gets or sets the color of the indicator.
Declaration
public Color IndicatorColor { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Graphics.Color | Specifies the color of the indicator. The default value is Colors.Blue. |
Examples
<sf:SfBusyIndicator IsRunning="True"
AnimationType="CircularMaterial"
Title="BusyIndicator"
IndicatorColor="Aqua"/>
IsRunning
Gets or sets the value indicating if the indicator is running.
Declaration
public bool IsRunning { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Specifies the indicator is running. The default value is false. |
Examples
<sf:SfBusyIndicator IsRunning="True"
AnimationType="CircularMaterial"
Title="BusyIndicator"/>
OverlayFill
Gets or sets the brush for an overlay background of the indicator.
Declaration
public Brush OverlayFill { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.Brush | Specifies the brush for an overlay background. The default value is null. |
Examples
<sf:SfBusyIndicator IsRunning="True"
AnimationType="CircularMaterial"
Title="BusyIndicator"
IndicatorColor="Aqua"
OverlayFill="#ff8000"/>
SizeFactor
Gets or sets the size of the indicator.
Declaration
public double SizeFactor { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Specifies the size of the indicator. The default value is 0.5. |
Examples
<sf:SfBusyIndicator IsRunning="True"
AnimationType="CircularMaterial"
Title="BusyIndicator"
SizeFactor="1"/>
TextColor
Gets or sets the color for the title of the indicator.
Declaration
public Color TextColor { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Graphics.Color | Specifies the color for the title of the indicator. The default value is Colors.Black. |
Examples
<sf:SfBusyIndicator IsRunning="True"
AnimationType="CircularMaterial"
Title="BusyIndicator"
TextColor="DarkGreen"/>
Title
Gets or sets the title of the indicator.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String | Specifies the title of the indicator. The default value is an empty string. |
Examples
The following example shows how to display the title.
<sf:SfBusyIndicator IsRunning="True"
AnimationType="CircularMaterial"
Title="BusyIndicator"
/>
TitlePlacement
Gets or sets the place for the title of the indicator.
Declaration
public BusyIndicatorTitlePlacement TitlePlacement { get; set; }
Property Value
Type | Description |
---|---|
BusyIndicatorTitlePlacement | Specifies the place for the title of the indicator. The default value is Bottom. |
Examples
<sf:SfBusyIndicator IsRunning="True"
AnimationType="CircularMaterial"
Title="BusyIndicator"
TitlePlacement="Top"/>
TitleSpacing
Gets or sets the title spacing for give space between title and indicator.
Declaration
public double TitleSpacing { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Specifies the title spacing for provide space. The default value is 10d. |
Examples
<sf:SfBusyIndicator IsRunning="True"
AnimationType="CircularMaterial"
Title="BusyIndicator"
TitleSpacing="40"/>
Methods
ArrangeContent(Rect)
Override the ArrangeContent to call CalculateXYPositions from DoubleCircleBusyIndicatorAnimation class.
Declaration
protected override Size ArrangeContent(Rect bounds)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Maui.Graphics.Rect | bounds |
Returns
Type |
---|
Microsoft.Maui.Graphics.Size |
Overrides
OnDraw(ICanvas, RectF)
On Draw method is used to draw the busy indicator.
Declaration
protected override void OnDraw(ICanvas canvas, RectF dirtyRect)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Maui.Graphics.ICanvas | canvas | Draw graphical objects on a canvas that's defined as an ICanvas object. |
Microsoft.Maui.Graphics.RectF | dirtyRect | It defines the rectangular bounds. |
Overrides
OnFontChanged(Font, Font)
This method hooked whenever the font changed.
Declaration
public void OnFontChanged(Font oldValue, Font newValue)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Maui.Font | oldValue | oldValue. |
Microsoft.Maui.Font | newValue | newValue. |
OnHandlerChanged()
Override the OnHandlerChanged to set the animation.
Declaration
protected override void OnHandlerChanged()