Select to view content in your preferred language

A value of type 'PrintOverviewLayer' cannot be added to a collection or dictionary ..

532
2
06-18-2013 10:11 AM
TroyProctor
Regular Contributor
I'm trying to customize a Map Printer Style from MapPrinterStyles.xaml. I've copied the basic style into my code and given it a key. It works fine when I remove this line of code below, but I would still like it to highlight the area to be printed.
<controls:PrintOverviewLayer />

I end up getting the following error message. 
A value of type 'PrintOverviewLayer' cannot be added to a collection or dictionary of type 'LayerCollection'.

I've tried removing and adding the MapPrintingControls reference back from the sample, but I still get the same error.

I've tried running the workaround in the post below, but I'm still getting the same error message.

http://forums.arcgis.com/threads/43749-printing-sample-issue?highlight=PrintOverviewLayer

I'm not sure what I missing.
Thanks for the help.

Troy
0 Kudos
2 Replies
DominiqueBroux
Esri Frequent Contributor
Likely there is a mismatch in the referenced dll's.
Double check that your main project and the project withthe printing controls reference the same ESRI dll's.
0 Kudos
TroyProctor
Regular Contributor
Dominique,
I've got the reference "MapPrintingControls" in my main project. I'm not sure what other project I need.

Thanks for the help!
Troy
0 Kudos