You can use a path and play with StrokeDashArray property like this :
<Grid Height="100" Width="100">
<Path Data="M5,1 L1,1"
Height="1"
Stretch="UniformToFill"
Stroke="Black"
StrokeThickness="2"
VerticalAlignment="Top"
StrokeDashArray="1 1"/>
</Grid>
Edit : By playing with LinearGradientBrush properties and Height of rectangle (or other ui element)... Change the StartPoint
and Height
for another dot size...
<Grid Height="100" Width="100">
<Rectangle Height="2">
<Rectangle.Fill>
<LinearGradientBrush
EndPoint="0,0"
StartPoint="3,0"
MappingMode="Absolute"
SpreadMethod="Repeat">
<GradientStop Color="Black" Offset="0.5"/>
<GradientStop Offset="0.5"/>
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
</Grid>