printing sample issue

1234
5
11-14-2011 08:11 AM
DanDong
New Contributor
Hi everyone, I am using the silverlight printing sample from code gallery
(http://www.arcgis.com/home/item.html?id=e361c2cc69784fcba34358d0458f66e3).

Everything works fine. But after I update esri's reference from 2.1 to 2.2, I got such error on the following code in xaml
<controls:PrintOverviewLayer TextSymbol="{x:Null}" >
                                                    <controls:PrintOverviewLayer.ExtentFillSymbol>
                                                        <esri:SimpleFillSymbol BorderBrush="Red" BorderThickness="3" Fill="Transparent" />
                                                    </controls:PrintOverviewLayer.ExtentFillSymbol>
                                                </controls:PrintOverviewLayer>


It says:
A value of type 'PrintOverviewLayer' cannot be added to a collection or dictionary of type 'LayerCollection'.

I am not sure whether that is because there is a conflict when the reference is 2.2? Has anybody run into this before? Any suggestions or hits are appreciated! 🙂
0 Kudos
5 Replies
DominiqueBroux
Esri Frequent Contributor
That's coming from a mix of dlls version.

To make it working:

  • Check your project references

  • Clean your solution

  • Exit Visual studio

  • Remove your project bin and obj folders

  • Open again VS

  • Rebuild your project : this should work.

0 Kudos
DanDong
New Contributor
That's coming from a mix of dlls version.

To make it working:

  • Check your project references

  • Clean your solution

  • Exit Visual studio

  • Remove your project bin and obj folders

  • Open again VS

  • Rebuild your project : this should work.



Thank you Dominique! I tried the above steps and I even delete the two reference, MapPrinting and MapPrintingControls, but the errors are still there. Looks like there are only two element in controls, CloneMap and SurrogateBinder, the others are gone. [ATTACH]10170[/ATTACH]

Do you have other thoughts on this? Thank you:)
0 Kudos
DominiqueBroux
Esri Frequent Contributor

Thank you Dominique! I tried the above steps and I even delete the two reference, MapPrinting and MapPrintingControls, but the errors are still there. Looks like there are only two element in controls, CloneMap and SurrogateBinder, the others are gone. Attachment 10170

Do you have other thoughts on this? Thank you


I already got this error and I am almost sure it's an issue with the referenced dlls.

Check also the referenced dlls in the MapPrintingControls project.

Sidenote : MapPrinting project was just a sample project using the printing controls, you should not need it if you created your own application.
0 Kudos
DorothyMortenson
Occasional Contributor II
There still seems to be the same problems.

But the sidenote cured it for me.  It sure would be nice to get it all working within the MapPrinting project, but something is messed up with the assemblies.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I've attached a version working with SL5 and ArcGIS 2.4 to this thread : http://forums.arcgis.com/threads/53015-Printing-with-Silverlight-5-and-API-2.4
0 Kudos