Hello ESRI Community,
Please help advise how to fix the issue. Currently I am using ArcGIS Pro 2.7. I am developing add-in button which tries to open ProgressDialog. I am using the following sample code from GitHub.
using (var progress = new ProgressDialog("Showing Progress", "Canceled", 100, false))
{
var status = new CancelableProgressorSource(progress);
status.Max = 100;
progress.Show();
await QueuedTask.Run(async () =>
{
for (var idx = 0; idx < 10; idx++)
{
await Task.Delay(1000);
status.Progressor.Value += 10;
status.Progressor.Status = (status.Progressor.Value * 100 / status.Progressor.Max) + @" % Completed";
status.Progressor.Message = "Message " + status.Progressor.Value;
}
}, status.Progressor);
progress.Hide();
}
For some reason, the ProgressDialog doesn't show up. The ProgressDialog was working fine in 2.6, but not in 2.7. Please advise how I can resolve this issue, because we're upgrading to 2.7 now and can't downgrade to 2.6. Thanks!
Solved! Go to Solution.
Hi,
Have you test it in debug mode? ProgressDialog does not show in Debug mode.
3. Run ArcGIS Pro without running the Visual Studio Debugger.
4. Progress Dialog boxes are disabled when debugging in Visual Studio.
Hi,
Have you test it in debug mode? ProgressDialog does not show in Debug mode.
3. Run ArcGIS Pro without running the Visual Studio Debugger.
4. Progress Dialog boxes are disabled when debugging in Visual Studio.
@GKmieliauskas is correct ProgressDialog does not show up in Debug mode. I tried your snippet in 2.7 and it worked, however, the 'await Task.Delay(1000)' didn't delay for me by 1 second as I expected. Instead I used System.Threading.Thread.Sleep(1000), which did the job.