AnsweredAssumed Answered

Create a ProgressDialog with ProgressBar

Question asked by EternalDOOM on Jan 23, 2020
Latest reply on Jan 23, 2020 by wkaiser-esristaff



I'm trying to create a progress dialog that shows a progress value from 0 to 100 %.


Doing some research I found out that ProgressDialog() with CancelableProgressorSource() is able to serve this. My current setting is as follows:


public async void ComponentChangedHandler(Component selectedComponent)
    using (var progress = new ProgressDialog("Start Work"))
        var status = new CancelableProgressorSource(progress);
        status.Progressor.Max = 100;

        await QueuedTask.Run(() =>
            uint step = 0;
            foreach (var dateRange in dateRanges)
                step += 10;
                status.Progressor.Value = step;
        }, status.Progressor);



This way I'm getting a nice progress dialog with my dialog message and a bar animation spinning from left to right and back again. What I want is a progress bar filling up from left to right increasing percent progress by 10 in each iteration step.

What am I missing here?