tags:

views:

31

answers:

1

suppose one end of my polyline is fixed say at 0,0 and when i move the mouse i want the polyline other end to be on my mousepointer exactly... what should i do in this case.... sorry i am very new to silverlight

A: 
System.Windows.Point staticPoint = new System.Windows.Point(100, 100);
System.Windows.Point mousePoint = e.GetPosition(CanvasContainer);

PointCollection polygonPoints = new PointCollection();
polygonPoints.Add(staticPoint);
polygonPoints.Add(mousePoint);

polyline.Points = polygonPoints;
Sathish