tags:

views:

31

answers:

1

I have an existing Polyline. How I can add a control point on it? In other words I need to add a control point on the LineSegment where I click with mouse. I use WPF.

Can anybody help me?

A: 

I didn't understand your question but I'll give a try :) what do you mean "control point" ? just adding new point ? If so, all you need is to register this method to the window "MouseDown" event :

  void Window1_MouseDown(object sender, MouseButtonEventArgs e)
        {
            Point mousePosition = (Point)e.MouseDevice.GetPosition(this);
            myPolyline.Points.Add(mousePosition);
        }
Erez