Dialog Launcher Buttons

1203
1
06-22-2016 01:06 PM
Highlighted
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. 

1 Reply
Highlighted
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.

Reply
0 Kudos