Select to view content in your preferred language

BorderStyle for Polygon

455
1
02-28-2012 10:44 PM
GUNJANDARBARI
New Contributor
Hi all,

I want to set borderstyle for polygon.I have user SimpleFillSymbol class to create a symbol,not getting any property as BorderStyle.
Please share if there is any other way to achieve the same.

Thanks,
Gunjan
0 Kudos
1 Reply
wangzhifang
Occasional Contributor
It's possible to define a border style for a fill symbol.
Just look at the Custom Fill Symbols in SymbolGallery here: http://help.arcgis.com/en/webapi/silverlight/samples/SymbolGalleryWeb/start.htm
You'll notice that we could define the control template of a FillSymbol to customize its fill property. In the same way, we also can define its border in this way by using a Brush, ex. LinearGradientBrush. Because the Fill and BorderBrush property of FillSymbol are both silverlight Brush type. You could do such way:
<esri:FillSymbol x:Name="CustomBorderFillSymbol" Fill="#66FF0000" BorderThickness="5">
                <esri:FillSymbol.BorderBrush>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="2,0"
                         SpreadMethod="Repeat" MappingMode="Absolute">
                        <GradientStop Color="Transparent" Offset="0" />
                        <GradientStop Color="Transparent" Offset="0.499" />
                        <GradientStop Color="#999" Offset="0.5" />
                    </LinearGradientBrush>
                </esri:FillSymbol.BorderBrush>
            </esri:FillSymbol>
0 Kudos