Search code examples
wpfpoints

C# WPF Use points to make a stroke in the ink canvas


I want to use a group of points to make a stroke in the ink canvas. How to convert StylusPointCollection or points into StrokeCollection?


Solution

  • Did you actually mean Stroke?

    You can simply use the constructor of Stroke to convert from StylusPointCollection.

    public Stroke (
        StylusPointCollection stylusPoints
    )