InkPresenterRuler Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a visual stencil, in the form of a straight rule for drawing straight lines, displayed as a semi-transparent overlay on an InkCanvas.
The stencil transforms how an ink stroke is rendered:
- It snaps the ink stroke to the stencil edge if the pen tip is within a distance threshold (gutter).
- It acts as a mask and prevents the drawing of an ink stroke within the area obscured by the stencil.
The InkPresenterRuler can be manipulated both programmatically and by the user. It also scales and translates with the InkCanvas.
public ref class InkPresenterRuler sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.UI.Input.Inking.IInkPresenterRulerFactory, 196608, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class InkPresenterRuler final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.UI.Input.Inking.IInkPresenterRulerFactory), 196608, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class InkPresenterRuler
Public NotInheritable Class InkPresenterRuler
- Inheritance
- Attributes
- Implements
Windows requirements
Device family |
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v3.0)
|
Remarks
The opacity of the stencil is set at 75% when static, and 50% during manipulation.
Version history
Windows version | SDK version | Value added |
---|---|---|
1703 | 15063 | AreTickMarksVisible |
1703 | 15063 | IsCompassVisible |
Constructors
InkPresenterRuler(InkPresenter) |
Initializes a new instance of the InkPresenterRuler class. |
Properties
AreTickMarksVisible |
Gets or sets whether the tick marks are displayed on the ruler stencil. Tick marks represent the distance marks on the ruler. |
BackgroundColor |
Gets or sets the background color of the InkPresenterRuler. |
ForegroundColor |
Gets or sets the color of the foreground elements on an InkPresenterRuler. |
IsCompassVisible |
Gets or sets whether a compass is displayed on the ruler stencil. |
IsVisible |
Gets or sets whether the InkPresenterRuler is visible. |
Kind |
Gets the type of stencil to display on the InkCanvas. |
Length |
Gets or sets the length of the InkPresenterRuler. |
Transform |
Gets or sets the position and rotation angle of the ruler stencil within the 2-D coordinate space of the InkCanvas. Both position and rotation are based on the top left corner of the ruler relative to the origin of the InkCanvas. |
Width |
Gets or sets the width of the InkPresenterRuler. |
Applies to
See also
- IInkPresenterStencil
- InkToolbar
- InkToolbarRulerButton
- Pen and stylus interactions
- Get started: Support ink in your UWP app
- Ink analysis sample (basic) (C#)
- Ink handwriting recognition sample (C#)
- Save and load ink strokes from an Ink Serialized Format (ISF) file
- Save and load ink strokes from the clipboard
- Ink toolbar location and orientation sample (basic)
- Ink toolbar location and orientation sample (dynamic)
- Coloring book sample
- Family notes sample
- Inking sample (JavaScript)
- Simple inking sample (C#/C++)
- Complex inking sample (C++)
- Ink analysis sample