Patrick
Patrick

Reputation: 2593

C# WPF Draw a sequence of point at the border of my canvas

The set of points can be quite large and it indicates the coordinates (kind of a photoshop ruler). It doesn't have to be too time-consuming and can be updated in case of zoom/pan. thanx

Upvotes: 1

Views: 509

Answers (1)

Glen Thomas
Glen Thomas

Reputation: 10764

You can create a sequence of points as a rectangle using a Rectangle control with a StrokeDashArray:

<Grid>
    <Rectangle Stroke="#FF000000" Height="1" StrokeThickness="1" StrokeDashArray="4 4" SnapsToDevicePixels="True"/>
    <Canvas Margin="4"/>
</Grid>

Upvotes: 2

Related Questions