locked
programmatic access to points in polyline RRS feed

  • Question

  • Hi,

     I'm trying to programmatically access the individual points in a polyline, but I'm having no luck.  I've tried a bunch of ways (obj.points, obj.points.pointCollection, etc.) but every time I try to reference the points object of the polyline, I get an error.   Below is my xaml and javascript.

    Thanks! 

      <Polyline Stroke="Black" StrokeThickness="10" Points="200,0 200,50 200,100" x:Name="stringLine" MouseLeftButtonDown="stretch">
      </Polyline>

    function stretch(sender, mouseEventArgs){
      // this works
     alert(sender.name);
    // this doesn't
     alert(sender.points.pointCollection.count);
    }

    Wednesday, June 6, 2007 3:35 PM

Answers