Using dataTemplateFile in Config.daml (comboBox) does not cause the expected behaviour

590
4
Jump to solution
02-02-2022 06:54 AM
ole1986
New Contributor III

According to the following guide:
ProGuide Combo boxes · Esri/arcgis-pro-sdk Wiki · GitHub

I have tried using a different Template with the dataTemplateFile attribute given in the Config.daml for a comboBox control (taking the exact same file from the example above / CustomComboResources.xaml)

What I get is empty rows. thats all. (see attached image)

Is there any hint on how to resolve this issue?

Versions: ArcGIS Pro 2.8 and 2.9

0 Kudos
1 Solution

Accepted Solutions
ole1986
New Contributor III

Finally the hint from ChrisSaylor helped me out to resolve the issue!
It is not mentioned in the documentation but important the set the dataTemplateFile (in my case the customCombobox.xaml) as build action to Resource

 

View solution in original post

0 Kudos
4 Replies
ole1986
New Contributor III

Bump! Any response highly appreciated 

0 Kudos
ChrisSaylor
New Contributor II

Had the same problem yesterday and was bashing my head.  However, once I opened a pane that utilized the same dictionary and a referenced IValueConverter class, errors started occurring that mentioned my resource dictionary was invalid.

I didn't realize that if your resource dictionary build action is "Resource" (vs. the default of Page), any imported namespace definitions needs to have the assembly fully qualified.  Once I added ";assembly=WaterImpactTools" to the end of the original "converters" and "selectors" imports (see highlighted lines screenshot), it started working.  I guess when Pro tries to load a resource dictionary and the dictionary fails to load, Pro doesn't say anything.  Let me know if this helps or you need any more details.

 

ChrisSaylor_0-1647612040698.png

 

0 Kudos
ole1986
New Contributor III

Hi ChrisSaylor,

thanks for your reply.

I assume you have successfully implemented such dataTemplateFile into a comboBox.
Can you provide me with more info, like which ArcGIS Version. Possible an example project?

 

0 Kudos
ole1986
New Contributor III

Finally the hint from ChrisSaylor helped me out to resolve the issue!
It is not mentioned in the documentation but important the set the dataTemplateFile (in my case the customCombobox.xaml) as build action to Resource

 

0 Kudos