Select to view content in your preferred language

enable a button for layouts only

1063
5
02-25-2021 10:43 AM
PeteVitt
Frequent Contributor

Hi - I'm using condition="esri_mapping_layoutPane" in the Config.daml file to have a button be enabled only in layout mode.  This was working until I recently upgraded ArcPro to 2.7.1.  Has anything changed to make this not work anymore?  the button is always disabled now

 

<button id="BaseMapProModule_BtnMapDoc" caption="Map Doc" className="BtnMapDoc" loadOnClick="true" smallImage="Images\GenericButtonBlue16.png" largeImage="Images\GenericButtonBlue32.png" condition="esri_mapping_layoutPane">

 

Thanks

 

Pete

0 Kudos
5 Replies
KirkKuykendall1
Frequent Contributor

From here:

Previously, Dockpanes could be established with a condition so that their content only appears when the condition is satisfied. This has now been deprecated.

You can now use WPF Visibility attributes to display or hide controls in the dockpane. Here are couple of samples in the arcgis-pro-sdk-community-samples repo that implement this.

Procedural Symbol Layers With Rule Packages
Construct Marker From Font

PeteVitt
Frequent Contributor

thanks Kirk, I'll look into this.  Are the WPF attributes implemented on the Config.daml or assigned in code?

Pete

0 Kudos
KirkKuykendall1
Frequent Contributor

I'm seeing same issue with button for esri_mapping_layoutPane with 2.7.1.

esri_mapping_mapPane works as expected.

Looks like a bug to me.

Wolf
by Esri Regular Contributor
Esri Regular Contributor

Thanks Kirk for pointing this out.  This appears to be a problem in 2.7.x.  We retested this issue in the upcoming 2.8 release and it has been fixed in 2.8.

0 Kudos
JeffBarrette
Esri Regular Contributor

Hello and thank you for reporting this issue.  It has been addressed for Pro version 2.8.

0 Kudos