Select to view content in your preferred language

Non-expandable Map Legend object

2030
2
02-07-2013 08:44 AM
YurongTan
Regular Contributor
I have been working Tech Support for this issue for quite some time and it seems to me the analyst just can't find the solution.  I am going to give it a shot here. 

I created a Legend to control (turn on/off, change Opacity, etc.) the map layers in an app and this Legend works fine.  In a test, the Legend works elegantly that each layer inside the Legend can be turned on, off, expanded, and collapsed and changed opacity.  However, when this Legend is merged with the app, it stays flat and non-expandable.  Because of that I tested this Legend under two test apps created  from the ESRI Standard and Showcase silverlight templates (3.0) and surprisingly the Legend does not for those test apps either.  There is no complilation errors of any kind.

From time to time, a warning message will pop up (see attachment) and the message says (let me type it):

[InvalidCastException was thrown on "Legend": Unable to cast object of type 'Microsoft.Expression.DesignModel.DocumentModel.DocumentPrimitiveNode' to type 'Microsoft.Expression.DesignModel.DocumentModel.DocumentCompositeNote'.  Clik here for detail. ]

This problem has been sitting there for over a month and it seems like going no where.  Any help or pointers here?  Thanks in advance.
0 Kudos
2 Replies
DominiqueBroux
Esri Frequent Contributor
That's a message that appears only in design time Inside Visual Studio.
However you should be able to compile and run your application despite this message.
0 Kudos
YurongTan
Regular Contributor
That's a message that appears only in design time Inside Visual Studio.
However you should be able to compile and run your application despite this message.


Thanks for the help and Problem SOLVED.  It is the default settings for the legend and once those settings are commented out in the App.xaml, everything goes.  Simple
0 Kudos