Removing items via DAML - not working

761
5
07-15-2018 04:55 PM
FraserHand1
New Contributor III

Hi,

I'm trying to strip out the ArcGIS Pro UI via DAML. 

This bit works:

<backstage>
<deleteButton refID="esri_core_saveProjectButton" />
<deleteButton refID="esri_core_saveProjectAsButton" />
<deleteButton refID="esri_core_showOptionsSheetButton"/>
<deleteTab refID="esri_core_AddInsTab"/>
<deleteTab refID="esri_core_CondaTab"/>
<deleteTab refID="esri_core_LicensingTab"/>
</backstage>
</ArcGIS>

but if I use something like this

<updateModule refID="esri_mapping" caption="Mapping" description="Mapping">
<dockPanes>
<deleteDockPane refID="esri_mapping_symbologyDockPane"/>
<deleteDockPane refID="esri_mapping_labelClassDockPane"/>
<deleteDockPane refID="esri_mapping_popupsDockPane" />
<deleteDockPane refID="esri_mapping_locateDockPane"/>
<deleteDockPane refID="esri_mapping_geocodeTableDockPane"/>
<deleteDockPane refID="esri_mapping_animationDockPane"/>
<deleteDockPane refID="esri_mapping_animationEditorDockPane"/>
<deleteDockPane refID="esri_mapping_animationPreviewDockPane"/>
<deleteDockPane refID="esri_mapping_animationTimelineDockPane"/>
<deleteDockPane refID="esri_mapping_temporalViewerDockPane"/>
<deleteDockPane refID="esri_mapping_annotationDockPane"/>
<deleteDockPane refID="esri_mapping_annotationClassCreateDockPane"/>
<deleteDockPane refID="esri_mapping_interactiveAnalysisDockPane"/>
</dockPanes>
</updateModule>

It doesn't - these items are still visible / usable in the ArcGIS Pro UI. I can nuke it via var someElements = from seg in database.Root.Descendants(nsp + "module") select seg; and removing the elements but I'm sure this will cause null exceptions down the track. Why isn't the DAML being honoured? I'm missing something.

Thanks,

Fraser

0 Kudos
5 Replies
UmaHarano
Esri Regular Contributor

Hi

The DAML is used to customize the appearance of the UI, especially the ribbon.  Even though you can syntactically use the "deleteDockPane" element in the DAML, the dockpanes are available in code and can be accessed using buttons, etc.  You can't completely prevent the ability to display the Symbology dockpane, for example.  You can only try and remove all the buttons in the UI that access it.

Thanks

Uma

0 Kudos
FraserHand1
New Contributor III

Hi there,

Thanks for the reply. I'm stripping out the buttons as much as I can but even if I use the deletedockPane it is still visible on the startup of ArcGIS Pro.

Thanks,

Fraser

0 Kudos
UmaHarano
Esri Regular Contributor

Hi Fraser

Try saving your project after closing the dockpane, that way when you reopen the project the dockpane will not show up. 

Dockpanes cannot be deleted, since they are available in the code within Pro. The buttons, context menu items that display the dockpanes can be removed.

DAML Elements - UI Customization

Note: In the above screenshot, you can delete the Symbology button on the Pro ribbon. But you will still be able to access the Symbology dockpane when you click the symbol in the TOC for a layer.

Thanks!

Uma

0 Kudos
FraserHand1
New Contributor III

Thanks for that - much appreciated. I'm having a bit of fun with context menus as well - I can remove the RMB context menus for database connections but not toolboxes - even though I have delete menu tag. Any tricks here?

Ta

Fraser

0 Kudos
FraserHand1
New Contributor III

Ok so the trick is to update to ArcGIS Pro 2.2.0 - this seems to honour all the DAML.

Thanks

Fraser

0 Kudos