rvinc

PictureMarkerSymbol's Source from SymbolDictionary

Discussion created by rvinc on Nov 6, 2012
Latest reply on Nov 13, 2012 by imackenzie-esristaff
I'm trying to get the image from the SymbolDictionary and use it on a PictureMarkerSymbol. When I run my app it generates an error. Here is the code:

SymbolDictionary symbolDictionary = new SymbolDictionary(SymbolDictionaryType.Mil2525C);

 IEnumerable<string> enumSymbol = new List<string>() { "SHGP-----------" };
IList<SymbolProperties> list = symbolDictionary.FindSymbols(enumSymbol);

 ImageSource imageSource = list[0].GetImage(30, 30);

PictureMarkerSymbol pictureMarkerSymbol2 = new PictureMarkerSymbol()
{
Source = imageSource
 };



Here is the error that I get once my app starts:

{"Specified method is not supported."}

There is not an error if I step right over the Source. In fact, it seems OK. It's only when the app is nearly open that this error occurs.

Thanks,

Ron

Outcomes