InkStroke.DrawingAttributes Property
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.
public:
property InkDrawingAttributes ^ DrawingAttributes { InkDrawingAttributes ^ get(); void set(InkDrawingAttributes ^ value); };
InkDrawingAttributes DrawingAttributes();
void DrawingAttributes(InkDrawingAttributes value);
public InkDrawingAttributes DrawingAttributes { get; set; }
var inkDrawingAttributes = inkStroke.drawingAttributes;
inkStroke.drawingAttributes = inkDrawingAttributes;
Public Property DrawingAttributes As InkDrawingAttributes
Property Value
The drawing attributes.
Examples
The following example demonstrates how to set a drawing attribute for a specific stroke.
Note
You cannot set the DrawingAttributes property of the stroke directly. You must create a copy of the InkDrawingAttributes of the stroke, set the desired values for that InkDrawingAttributes object, and then assign the new InkDrawingAttributes to the DrawingAttributes of the stroke, as shown here.
// Get the InkStroke objects.
IReadOnlyList<InkStroke> inkStrokes = inkManager.GetStrokes();
Windows.UI.Input.Inking.InkStroke cloneStroke =
inkStrokes.GetAt(index).Clone();
Windows.UI.Input.Inking.InkDrawingAttributes drawingAttributes =
cloneStroke.DrawingAttributes;
drawingAttributes.PenTip = Windows.UI.Input.Inking.PenTipShape.Rectangle;
cloneStroke.DrawingAttributes = drawingAttributes;
Applies to
See also
- 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