Select to view content in your preferred language

Problem displaying UI in Design mode for Legend

1545
3
12-17-2010 03:23 AM
by Anonymous User
Not applicable
Original User: bpangtay

I'm getting a CAST error when I try to view MainPage XAML in Design mode. The error is on the line where one defines which Layers to include in the Legend where it is casting from DocumentPrimitiveNode to DocumentCompositeNode. Otherwise, the application works as expected but I can't edit the UI graphically. See enclosed images.

I'm using VS 2010, Silverlight 4, ESRI Silverlight API 2.1 and ArcGIS Server 10sp1.

Has anyone else experienced this problem?

Thanks for your help.
0 Kudos
3 Replies
AngelGonzalez
Frequent Contributor
I think you need Microsoft Expression 4.0 to do any editing to the UI.  If you look at the error message it specifically states "Unable to cast object type 'Microsoft.Expression.DesignModel..."
0 Kudos
by Anonymous User
Not applicable
Original User: jenniferdnery

This is a bug in Blend and VS Design-time. Your project will still build and run. Unfortunately, you will not be able to see Design view. This is related thread: http://forums.arcgis.com/threads/18589-Minor-problem-with-Legend-control
0 Kudos
DanielMoran
Emerging Contributor
Hi, I have had this trouble too, this is not a solution but a work around.
Just comment out LayerIDs param  while developing, restore it and build before deploying to production.

<esri:Legend Map="{Binding ElementName=MyMap}"
LayerItemsMode="Flat"
/> <!--LayerIDs="Businesses, Community Facilities, Education, Base Map Layer"-->

Hope this helps.
0 Kudos