Select to view content in your preferred language

Dynamically creating symbols

812
1
10-06-2010 11:38 PM
NehaAgarwal
New Contributor
I have a requirement to create a symbol picker for redlining for which, I need to create a modal for the same to pick the symbols from a defined resource dictionary.e.g : there would be multiple SimpleFillSymbol for polygon.

Is there any way todo this?


<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
    xmlns:esriSymbols="clr-namespace:ESRI.ArcGIS.Client.Symbols;assembly=ESRI.ArcGIS.Client"
    >

    <esriSymbols:SimpleLineSymbol x:Name="DrawLineSymbol" Color="Green" Width="4" />
    <esriSymbols:SimpleFillSymbol x:Name="DrawFillSymbol" Fill="#3300FF00" BorderBrush="Green" BorderThickness="2" />
    <esriSymbols:SimpleMarkerSymbol x:Name="DefaultMarkerSymbol" Color="Red" Size="12" Style="Circle" />
    <esriSymbols:SimpleLineSymbol x:Name="DefaultLineSymbol" Color="Red" Width="4" />
    <esriSymbols:SimpleFillSymbol x:Name="DefaultFillSymbol" Fill="#33FF0000" BorderBrush="Red" BorderThickness="2" />
          

</ResourceDictionary>
0 Kudos
1 Reply
dotMorten_esri
Esri Notable Contributor
Take a look at the SymbolDisplay control in the Toolkit.Primivites namespace. It can render a symbol. Put these in a ComboBox and have the user select one of them.
0 Kudos