MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfLinearProgressBar

    Show / Hide Table of Contents

    Class SfLinearProgressBar

    Represents SfLinearProgressBar class.

    Inheritance
    System.Object
    SfView
    ProgressBarBase
    SfLinearProgressBar
    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.IVisualTreeElement
    Inherited Members
    ProgressBarBase.MinimumProperty
    ProgressBarBase.MaximumProperty
    ProgressBarBase.TrackFillProperty
    ProgressBarBase.ProgressProperty
    ProgressBarBase.ProgressFillProperty
    ProgressBarBase.SegmentCountProperty
    ProgressBarBase.SegmentGapWidthProperty
    ProgressBarBase.IsIndeterminateProperty
    ProgressBarBase.IndeterminateIndicatorWidthFactorProperty
    ProgressBarBase.IndeterminateAnimationEasingProperty
    ProgressBarBase.IndeterminateAnimationDurationProperty
    ProgressBarBase.AnimationDurationProperty
    ProgressBarBase.AnimationEasingProperty
    ProgressBarBase.GradientStopsProperty
    ProgressBarBase.SetProgress(Double, Nullable<Double>, Easing)
    ProgressBarBase.OnDraw(ICanvas, RectF)
    ProgressBarBase.OnBindingContextChanged()
    ProgressBarBase.Minimum
    ProgressBarBase.Maximum
    ProgressBarBase.TrackFill
    ProgressBarBase.Progress
    ProgressBarBase.ProgressFill
    ProgressBarBase.SegmentCount
    ProgressBarBase.SegmentGapWidth
    ProgressBarBase.IsIndeterminate
    ProgressBarBase.IndeterminateIndicatorWidthFactor
    ProgressBarBase.IndeterminateAnimationEasing
    ProgressBarBase.IndeterminateAnimationDuration
    ProgressBarBase.AnimationDuration
    ProgressBarBase.AnimationEasing
    ProgressBarBase.GradientStops
    ProgressBarBase.ProgressChanged
    ProgressBarBase.ProgressCompleted
    SfView.ArrangeContent(Rect)
    SfView.MeasureOverride(Double, Double)
    SfView.ArrangeOverride(Rect)
    SfView.OnMeasure(Double, Double)
    SfView.OnHandlerChanged()
    SfView.IDrawableLayout.InvalidateDrawable()
    SfView.Children
    SfView.ClipToBounds
    SfView.Padding
    SfView.IDrawableLayout.DrawingOrder
    Namespace: Syncfusion.Maui.ProgressBar
    Assembly: Syncfusion.Maui.ProgressBar.dll
    Syntax
    public class SfLinearProgressBar : ProgressBarBase, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, IVisualTreeElement
    Examples
    • XAML
    • C#
    <progressBar:SfLinearProgressBar Minimum="0"
                                     Maximum="100"
                                     TrackFill="Blue"
                                     Progress="70"
                                     ProgressFill="Yellow"
                                     SegmentCount="1"
                                     SegmentGapWidth="10"
                                     IsIndeterminate="False"
                                     IndeterminateIndicatorWidthFactor="0.2"
                                     IndeterminateAnimationEasing="{x:Static Easing.SpringIn}"
                                     IndeterminateAnimationDuration="1500"
                                     AnimationEasing="{x:Static Easing.SpringOut}"
                                     AnimationDuration="4000"
                                     SecondaryProgress="100"
                                     ProgressHeight="25"
                                     SecondaryProgressHeight="25"
                                     ProgressCornerRadius="0,13,0,13"
                                     SecondaryProgressCornerRadius="0,13,0,13"
                                     TrackHeight="25"
                                     TrackCornerRadius="0,13,0,13"
                                     ProgressPadding = "10"
                                     ProgressCompleted="SfLinearProgressBar_ProgressCompleted"
                                     ProgressChanged="SfLinearProgressBar_ProgressChanged">
         <progressBar:SfLinearProgressBar.GradientStops>
             <progressBar:ProgressGradientStop Value="50"
                                               Color="Yellow" />
             <progressBar:ProgressGradientStop Value="100"
                                               Color="Green" />
         </progressBar:SfLinearProgressBar.GradientStops>
    </progressBar:SfLinearProgressBar>
    private void SfLinearProgressBar_ProgressCompleted(object sender, ProgressValueEventArgs e)
    {
        DisplayAlert("ProgressCompleted", "Progress: " + e.Progress, "Ok");
    }
    private void SfLinearProgressBar_ProgressChanged(object sender, ProgressValueEventArgs e)
    {
        DisplayAlert("ValueChanged", "Progress: " + e.Progress, "Ok");
    }

    Constructors

    SfLinearProgressBar()

    Declaration
    public SfLinearProgressBar()

    Fields

    ProgressCornerRadiusProperty

    Identifies the ProgressCornerRadius bindable property.

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

    The identifier for ProgressCornerRadius bindable property.

    ProgressHeightProperty

    Identifies the ProgressHeight bindable property.

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

    The identifier for ProgressHeight bindable property.

    ProgressPaddingProperty

    Identifies the ProgressPadding bindable property.

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

    The identifier for ProgressPadding bindable property.

    SecondaryAnimationDurationProperty

    Identifies the SecondaryAnimationDuration bindable property.

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

    The identifier for SecondaryAnimationDuration bindable property.

    SecondaryProgressCornerRadiusProperty

    Identifies the SecondaryProgressCornerRadius bindable property.

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

    The identifier for SecondaryProgressCornerRadius bindable property.

    SecondaryProgressFillProperty

    Identifies the SecondaryProgressFill bindable property.

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

    The identifier for SecondaryProgressFill bindable property.

    SecondaryProgressHeightProperty

    Identifies the SecondaryProgressHeight bindable property.

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

    The identifier for SecondaryProgressHeight bindable property.

    SecondaryProgressProperty

    Identifies the SecondaryProgress bindable property.

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

    The identifier for SecondaryProgress bindable property.

    TrackCornerRadiusProperty

    Identifies the TrackCornerRadius bindable property.

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

    The identifier for TrackCornerRadius bindable property.

    TrackHeightProperty

    Identifies the TrackHeight bindable property.

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

    The identifier for TrackHeight bindable property.

    Properties

    ProgressCornerRadius

    Gets or sets a value to determine the corner radius of the progress.

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

    The corner radius of the progress.

    Examples
    • XAML
    • C#
    <progressBar:SfLinearProgressBar ProgressCornerRadius="5,5,5,5"
                                     Progress="50" />
    SfLinearProgressBar progressBar = new SfLinearProgressBar();
    progressBar.ProgressCornerRadius = new CornerRadius(5, 5, 5, 5);
    progressBar.Progress = 50;
    this.Content = progressBar;

    ProgressHeight

    Gets or sets a value to determine the progress height.

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

    The height of the progress. The default value is 5.

    Examples
    • XAML
    • C#
    <progressBar:SfLinearProgressBar ProgressHeight="20"
                                     Progress="50" />
    SfLinearProgressBar progressBar = new SfLinearProgressBar();
    progressBar.ProgressHeight = 20;
    progressBar.Progress = 50;
    this.Content = progressBar;

    ProgressPadding

    Gets or sets the value that specifies the padding to be applied to the progress or the secondary progress indicator.

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

    The padding of the progress or the secondary progress. The default value is 0.

    Remarks

    The padding will be applied only at the start and end of the Progress or SecondaryProgress indicator. To adjust the top and bottom of the indicator ProgressHeight or SecondaryProgressHeight is considered.

    Examples
    • XAML
    • C#
    <progressBar:SfLinearProgressBar ProgressPadding="10"
                                     Progress="50" />
    SfLinearProgressBar progressBar = new SfLinearProgressBar();
    progressBar.ProgressPadding = 10;
    progressBar.Progress = 50;
    this.Content = progressBar;

    SecondaryAnimationDuration

    Gets or sets a value that specifies the secondary progress animation duration in milliseconds.

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

    The default value is 1500 milliseconds.

    Examples
    • XAML
    • C#
    <progressBar:SfLinearProgressBar SecondaryProgress="75"
                                     SecondaryAnimationDuration="3000" />
    SfLinearProgressBar progressBar = new SfLinearProgressBar();
    progressBar.SecondaryProgress = 75;
    progressBar.SecondaryAnimationDuration = 3000;
    this.Content = progressBar;

    SecondaryProgress

    Gets or sets the secondary progress value for the SfLinearProgressBar.

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

    The default value is 0.

    Examples
    • XAML
    • C#
    <progressBar:SfLinearProgressBar SecondaryProgress="75" />
    SfLinearProgressBar progressBar = new SfLinearProgressBar();
    progressBar.SecondaryProgress = 75;
    this.Content = progressBar;

    SecondaryProgressCornerRadius

    Gets or sets a value to determine the corner radius of the secondary progress.

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

    The corner radius of the secondary progress.

    Examples
    • XAML
    • C#
    <progressBar:SfLinearProgressBar SecondaryProgressCornerRadius="5,5,5,5"
                                     SecondaryProgress="50" />
    SfLinearProgressBar progressBar = new SfLinearProgressBar();
    progressBar.SecondaryProgressCornerRadius = new CornerRadius(5, 5, 5, 5);
    progressBar.SecondaryProgress = 50;
    this.Content = progressBar;

    SecondaryProgressFill

    Gets or sets the brush that paints the interior area of the secondary progress.

    Declaration
    public Brush SecondaryProgressFill { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Controls.Brush

    SecondaryProgressFill specifies how the secondary progress is painted.

    Examples
    • XAML
    • C#
    <progressBar:SfLinearProgressBar SecondaryProgress="75"
                                     SecondaryProgressFill="Violet" />
    SfLinearProgressBar progressBar = new SfLinearProgressBar();
    progressBar.SecondaryProgress = 75;
    progressBar.SecondaryProgressFill = Colors.Violet;
    this.Content = progressBar;

    SecondaryProgressHeight

    Gets or sets a value to determine the secondary progress height.

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

    The height of the secondary progress. The default value is 5.

    Examples
    • XAML
    • C#
    <progressBar:SfLinearProgressBar SecondaryProgressHeight="20"
                                     SecondaryProgress="75" />
    SfLinearProgressBar progressBar = new SfLinearProgressBar();
    progressBar.SecondaryProgressHeight = 20;
    progressBar.SecondaryProgress = 75;
    this.Content = progressBar;

    TrackCornerRadius

    Gets or sets a value to determine the corner radius of the track.

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

    The corner radius of the track.

    Examples
    • XAML
    • C#
    <progressBar:SfLinearProgressBar TrackCornerRadius="5,5,5,5" />
    SfLinearProgressBar progressBar = new SfLinearProgressBar();
    progressBar.TrackCornerRadius = new CornerRadius(5, 5, 5, 5);
    this.Content = progressBar;

    TrackHeight

    Gets or sets a value to determine the track height.

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

    The height of the track. The default value is 5.

    Examples
    • XAML
    • C#
    <progressBar:SfLinearProgressBar TrackHeight="20" />
    SfLinearProgressBar progressBar = new SfLinearProgressBar();
    progressBar.TrackHeight = 20;
    this.Content = progressBar;

    Methods

    MeasureContent(Double, Double)

    Measures the size in layout required for child elements.

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

    The widthConstraint.

    System.Double heightConstraint

    The heightConstraint.

    Returns
    Type Description
    Microsoft.Maui.Graphics.Size

    Return child element size.

    Overrides
    SfView.MeasureContent(Double, Double)

    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.IVisualTreeElement
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved