Select to view content in your preferred language

need to have a ControlTemplate for PictureMarkerSymbol

607
0
04-28-2010 07:23 AM
GregLittlehales
Emerging Contributor
I make several GraphicsLayers at runtime from table data and use PictureMarkerSymbols on the graphic.

In the code-behind, I can assign a ControlTemplate from the page's resources declaration to the Symbol when I create the graphic:
            PictureMarkerSymbol symbol = new PictureMarkerSymbol()
            {
                Height = 20,
                ControlTemplate = TemplateDefinedInPage.Resource
            }


I'd like to move those ControlTemplates out of the Page.Resources section to someplace more appropriate (given that they are large and there are several).  What would be the best place to put them?

Also, I'd like to alter the properties of the symbols when I assign the template.  (I want to change the color and change the picture).  How can this be done?

The controlTemplate includes some animations.  Is it possible to modify animations at runtime and assign them to a PictureMarkerSymbol?  Through a ControlTemplate or other means?  TIA.
0 Kudos
0 Replies