0

I am trying to draw a polyline on inkcanvas that works like the video below.

I would like to draw a polyline that I can add a point so that I can modify the polyline.

https://www.youtube.com/watch?v=N9yPc14eVuQ

I used a Stroke but I have to use a polyline so that I have to add a point at an arbitrary position. The following code is the most recent code.

 Polyline polyline = new Polyline();
 pointCollection = new 
 pointCollection.Add(new Point(100, 100));
 pointCollection.Add(new Point(200, 200));

 polyline.Points = pointCollection;
 SolidColorBrush solidColorBrush = Brushes.Black;

 polyline.Stroke = solidColorBrush;
 polyline.StrokeThickness = Epaisseur;

 inkCanvas.Children.Add(polyline);

The result

Problem

ChrisLEE
  • 31
  • 8
  • Can you explain what "I used a Stroke but I have to use a polyline so that I have to add a point at an arbitrary position" means? – Enigmativity Mar 23 '19 at 01:13
  • @Enigmativity If I use a stroke, I don't think I can add a point so that I can change the shape of the stroke. For example, le'ts say there is a point on a straight line at each endpoint like this ㅡ. I want to add a point on a polyline between two endpoints so that I can change the shape /\ or V. Like the video – ChrisLEE Mar 23 '19 at 01:31
  • 1
    Are you saying that you want it interactive? – Enigmativity Mar 23 '19 at 02:41
  • @Enigmativity That is absolutely right. – ChrisLEE Mar 23 '19 at 02:50
  • AFAIK that's something you need to code for. It's not built-in - you have to do your own interactivity. – Enigmativity Mar 23 '19 at 04:21

0 Answers0