Are prompts allowed in OnToolActivateAsync

290
0
05-02-2019 01:47 PM
TimWhiteaker
Occasional Contributor II

When a user activates a map tool, I want to prompt them for a folder using FolderBrowserDialog. As soon as the dialog opens, the application hangs.  To simplify this test, I also tried just showing a message box. The message box shows, but then the application hangs, and I cannot click OK on the message box or interact with the rest of Pro.  Is there a way to prompt the user during OnToolActivateAsync?

protected override Task OnToolActivateAsync(bool hasMapViewChanged)
{
    MessageBox.Show("Now we are stuck");
    return base.OnToolActivateAsync(hasMapViewChanged);
}

Environment:

Windows 10

Visual Studio 2017 Community Edition

Pro SDK for .NET (and Utilities) 2.3.0.15769

Pro 2.3.2

0 Kudos
0 Replies