Drawing Grid pattern on Canvas with straight lines instead of rectangles

Viewed 721

Right now I draw my grid with this brush:

<VisualBrush x:Key="GridBrush" TileMode="Tile"
        Viewport="0,0,60,60" ViewportUnits="Absolute"
        Viewbox="0,0,60,60" ViewboxUnits="Absolute" >
    <VisualBrush.Visual>
        <Rectangle Stroke="Darkgray" StrokeThickness="1" Height="60" Width="60"
            StrokeDashArray="5 3"/>
    </VisualBrush.Visual>
</VisualBrush>

And I get this effect:

overalapping

The rectangles here are overlapping.

The thing I have to achieve is:

wanted result

1 Answers
Related