Select to view content in your preferred language

Symbol and ControlTemplate

799
2
11-24-2010 02:44 AM
SamuelDantas
Emerging Contributor
Hi,
Is it possible to create a Symbol programmatically with any shape (with a Path, for example)?
The ArcGIS Symbol Gallery uses ControlTemplate like this:

<esri:MarkerSymbol x:Key="esriDefaultMarker_33" OffsetX="6.5" OffsetY="6.5">
    <esri:MarkerSymbol.ControlTemplate>
      <ControlTemplate>
        <Grid RenderTransformOrigin="0.5,0.5">
          <Grid.RenderTransform>
            <TransformGroup>
              <ScaleTransform ScaleX="1" ScaleY="1" />
            </TransformGroup>
          </Grid.RenderTransform>
          <Ellipse Width="13" Height="13" Fill="Black" HorizontalAlignment="Center" VerticalAlignment="Center" />
        </Grid>
      </ControlTemplate>
    </esri:MarkerSymbol.ControlTemplate>
  </esri:MarkerSymbol>


But I can't convert a Path programmatically to a ControlTemplate.

Thanks.
0 Kudos
2 Replies
DominiqueBroux
Esri Frequent Contributor
You can only create a controltemplate by parsing in the xaml as a string (using XamlReader).

I found an example in this thread : http://forums.arcgis.com/threads/11356-MapTip-not-working-while-using-a-Custom-Marker-Symboll
0 Kudos
SamuelDantas
Emerging Contributor
Thank you Dominique.
0 Kudos