I am running into a problem attempting to create a progress dialog. I have implemented the code below that I found on a thread from this forum, but I get absolutely nothing. The task delay of 10 seconds works, but I do not see a progress dialog at all. I have tested this in two different add-ins, including one that was created just to test this functionality. I have also had a fellow team member test on another computer to no effect. In addition, I have also checked out and tested with the code from https://github.com/esri/arcgis-pro-sdk-community-samples/tree/master/Framework/ProgressDialog. Any thoughts? Am I missing something?
As an fyi, I am developing with ArcGIS Pro 2.9 (if that means anything).
The following is the code that I am using:
using (ProgressDialog progDialog = new ProgressDialog("Showing Progress", "Canceled", 100, false))
{
CancelableProgressorSource cps = new CancelableProgressorSource(progDialog)
{
Max = 100
};
progDialog.Show();
await QueuedTask.Run(async () =>
{
//uint step = 0;
for (int idx = 0; idx < 10; idx++)
{
await Task.Delay(1000);
cps.Progressor.Value += 10;
cps.Progressor.Status = (cps.Progressor.Value * 100 / cps.Progressor.Max) + @" % Completed";
cps.Progressor.Message = "Message " + cps.Progressor.Value;
}
}, cps.Progressor);
progDialog.Hide();
}