Dialog Launcher Buttons

1950
2
06-22-2016 01:06 PM
TedChapin
Occasional Contributor III

I have a custom property page that I added to the esri_core_optionsPropertySheet property sheet. I use this to save custom project settings. I found the dialog launcher buttons (described here​) and I see that you can use DAML ID's for predefined options buttons like esri_core_showOptionsSheetButton but I can't figure out how to launch the options sheet with my custom page selected. 

2 Replies
TedChapin
Occasional Contributor III

Answered my own question!

You have to create a button that launches the property page in its OnClick event. Then reference that button's ID in the launcherButtonID of the group in which you want the dialog launcher to appear.  If you don't want a whole other button just for that, then simply remove it from any group.

I added a custom page to the project options property sheet like this:

  <propertySheets>

    <updateSheet refID="esri_core_optionsPropertySheet">

      <insertPage id="myCustomPage" caption="My Custom Settings" className="MyCustomPageViewModel" group="Project">

        <content className="MyCustomPageView" />

      </insertPage>

    </updateSheet>

  </propertySheets>

In the button's OnClick:

ArcGIS.Desktop.Framework.PropertySheet.ShowDialog("esri_core_optionsPropertySheet", "myCustomPage")

Now my dialog launcher mini-icon launches my custom properties page, or users can get to it via the back stage. Looks just  like the out of the box tabs.

0 Kudos
AbelPerez
Occasional Contributor III

I needed this. Thanks!!!

0 Kudos