Forcing Initialization Order of Settings Pages

53
0
02-25-2020 07:57 AM
DavidLaMartina
New Contributor III

I'm working with several custom settings pages in an ArcGIS Pro add-in. Most of these pages subscribe to events on other pages.

I have a case where the initialization of one page should be complete before the initialization of a dependent page proceeds. Within its InitializeAsync() method, the dependent page subscribes to an event on the dependency page. The line responsible for the subscription kicks off the initialization of the dependency page (with a call to PropertySheet.Page("MY_DEPENDENCY_PAGE")).

Unfortunately, I can't simply await that call to PropertySheet.Page(), and so the rest of the dependent page's initialization keeps on going. I tried to wrap the subscription in a QueuedTask.Run() call, and that "worked" as far as the dependent page was concerned - but then the initialization of the dependency page's UI fails because it's running on the MCT.

Is there any way to force this initialization to occur in order?

0 Kudos
0 Replies