-1

假设我的多段线的一端固定在 0,0,当我移动鼠标时,我希望多段线的另一端正好在我的鼠标指针上。在这种情况下我该怎么办?

抱歉,我对 Silverlight 很陌生。

4

1 回答 1

1
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;
于 2010-02-19T09:24:14.957 回答