Strokes Property
Collapse the table of content
Expand the table of content

InkPresenter.Strokes Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets the strokes that the InkPresenter displays.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

public StrokeCollection Strokes { get; set; }
<!--see Remarks; XAML usage is uncommon-->
<InkPresenter>
  <InkPresenter.Strokes>
    oneOrMoreStrokes
  </InkPresenter.Strokes>
</InkPresenter>

XAML Values

oneOrMoreStrokes

One or more Stroke object elements.

Property Value

Type: System.Windows.Ink.StrokeCollection
The collection of ink strokes that are displayed by the InkPresenter.

Dependency property identifier field: StrokesProperty

In practical terms, you would generally never replace the complete Strokes collection (by using the "set" aspect of this property). However, when the collection of strokes is populated by user input, you might add, remove, or query stroke items from the existing collection. Typically you do this by handling user input events, creating new Stroke objects based on starting and ending positions during user actions, and adding these strokes to the collection.

In order to render, each Stroke in the collection held by Strokes must also have values established for the DrawingAttributes property.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2016 Microsoft