Skip to main content
A newer version of this page is available. .

IProgressIndicationService Interface

Exposes functionality that enables you to display a progress indicator for time-consuming operations.

Namespace: DevExpress.Services

Assembly: DevExpress.Data.v20.2.dll

NuGet Packages: DevExpress.Data, DevExpress.WindowsDesktop.Data

Declaration

public interface IProgressIndicationService

Remarks

The IProgressIndicationService interface can be used in RichEditControl to track the progress of export, import and mail merge operations. In this case, it is called internally by the RichEditControl only if the projected duration of an operation exceeds a certain threshold (ca. 500 ms)

class MyProgressIndicatorService : IProgressIndicationService
{
    private ProgressBarControl _Indicator;
    public ProgressBarControl Indicator
    {
        get { return _Indicator; }
        set { _Indicator = value; }
    }

    public MyProgressIndicatorService(IServiceProvider provider, ProgressBarControl indicator)
    {
        _Indicator = indicator;
    }

    #region IProgressIndicationService Members

    void IProgressIndicationService.Begin(string displayName, int minProgress, int maxProgress, int currentProgress)
    {
        _Indicator.Properties.Minimum = minProgress;
        _Indicator.Properties.Maximum = maxProgress;
        _Indicator.Properties.ShowTitle = true;
        _Indicator.EditValue = currentProgress;
        _Indicator.Refresh();
        _Indicator.Show();            
    }

    void IProgressIndicationService.End()
    {
        _Indicator.Refresh();
        _Indicator.Hide();
    }

    void IProgressIndicationService.SetProgress(int currentProgress)
    {
        _Indicator.EditValue = currentProgress;
        _Indicator.Refresh();
    }
    #endregion
}
using DevExpress.Services;
            richEditControl1.ReplaceService<IProgressIndicationService>
                (new MyProgressIndicatorService(richEditControl1, this.progressBarControl1));

The following code snippets (auto-collected from DevExpress Examples) contain references to the IProgressIndicationService interface.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also