IProgressIndicationService Interface
Exposes functionality that enables you to display a progress indicator for time-consuming operations.
Namespace: DevExpress.Services
Assembly: DevExpress.Data.v18.2.dll
Declaration
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)
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-implement-progress-indicator-for-slow-richeditcontrol-operations-e3075
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
}
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-implement-progress-indicator-for-slow-richeditcontrol-operations-e3075
using DevExpress.Services;
richEditControl1.ReplaceService<IProgressIndicationService>
(new MyProgressIndicatorService(richEditControl1, this.progressBarControl1));
Related GitHub Examples
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.