Properties you may want to know

Length

Gets or sets the length of the ruler. If the AutoSize property is set to false (default) this is a fixed length. Otherwise the length is calculated based on the actual width of the ruler.

Example:
<my:PixelRuler Length="250" />

AutoSize

If true, the length of the ruler is always adjusted to its actual width. This ensures that the ruler is shown for the actual width of the window.
If false, the length of the ruler results from the Length property. If the window size is changed, e.g. wider than the rulers length, free space is shown at the end of the ruler. No rescaling is done.

Example:
<my:PixelRuler AutoSize="True" />


Zoom

Gets or sets the zoom factor for the ruler. The default value is 1.0.

SmallStep

Gets or sets the small step for the ruler. The default value is 25.0.

Example:
<my:PixelRuler SmallStep="10" />


<my:PixelRuler SmallStep="75" />

Step

Gets or sets the small step for the ruler. The default value is 100.0.

Example:
<my:PixelRuler AutoSize="True" SmallStep="5" Step="25" />


<my:PixelRuler AutoSize="True" SmallStep="10" Step="25" />

Why not 25, 50, ... are the steps? Because it only multiplies of SmallStep will be drawn.

Chip

Sets the location of the chip in the units of the ruler.

CountShift

By default the counting of numbers starts at zero, this property allows you to shift the counting.

Marks

Gets or sets where the marks are shown in the ruler.

Last edited Apr 18, 2014 at 6:46 AM by smurancsik, version 4