1

I'm developing a WPF application. One of my requirements is to have polygon borders drawn with a dash-dot-dash style. Is there a way to accomplish that in the client side?

So far I've tried:

var graphic = new Graphic();
graphic.Symbol = new SimpleFillSymbol
{
    BorderBrush = new SolidColorBrush(Color.FromArgb(255, 255, 0, 255)),
    BorderThickness = 5
}

1 Answer 1

1

You should define a CartographicLineSymbol with a custom DashArray. If you have adjacent polygons, I recommend you to first convert your polygons to lines because two adjacent polygons each have a borders and the patterns could overlap in a wrong way. Display those lines on top of polygons without outlines and the rendering will be as you want. Below is an illustration on the use of dashArray to create dash-dot-dash lines.

enter image description here

the "grammar" for this line would be 5,2,1,2 (stroke of 5 (=dash), gap of 2, stroke of 1 (=dot), gap of 2 )

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.