Select to view content in your preferred language

pass picture symbol to code behind

532
1
11-01-2010 12:25 PM
lyndamccallum
Deactivated User
Hi

I'm trying to pass my default picture symbol to the code behind in a usercontrol. Any help would be appreciated.

Thanks
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
Do you mean create the PictureMarkerSymbol in code-behind or simply access from XAML resource as in this sample:
http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AddGraphics

These two are equivalent code:
      <esri:PictureMarkerSymbol x:Key="GlobePictureSymbol" OffsetX="8" OffsetY="8" 
                Source="/Assets/images/globe-16x16.png" />


 PictureMarkerSymbol pms = new PictureMarkerSymbol()
 {
  OffsetX = 8,
  OffsetY = 8,
  Source = new BitmapImage(new Uri("/Assets/images/globe-16x16.png", UriKind.RelativeOrAbsolute))
 };
0 Kudos