1

I'm using Microsoft Visual Studio 2010, including reference Dynamic data display. I'm creating DraggablePoint in c# code. The point creating perfect, My problem is how to make the point unmoveable on the map ? I'm tried to search for property unMoveable or Moveable false but there is no something like this. My code :

    // Creating the new DraggablePoint
    globalPoint = new DraggablePoint(new Point(x1,y1));

    // Set the point position
    globalPoint.Position = new Point(x1,y1);

    // Set the point on the map
    plotter.Children.Add(globalPoint);

Thanks for help.

RonYamin
  • 77
  • 2
  • 11

1 Answers1

0

You can register a callback that moves the point back to its initial position when it's been moved.

Point p = new Point(x1, y1);
var globalPoint = new DraggablePoint(p);

globalPoint.PositionChanged += (s, e) => 
{ 
    globalPoint.Position = p; 
};
kennyzx
  • 12,845
  • 6
  • 39
  • 83
  • exactly what I search for. Thanks dude :) If you can take a look in my second question I would be verry happy :http://stackoverflow.com/questions/26440392/make-text-on-segment-on-chartplotter-dynamic-data-display-c-sharp – RonYamin Oct 18 '14 at 17:03
  • and on this question http://stackoverflow.com/questions/26442491/brightness-of-chartplotter-dynamic-data-display-c-sharp THANKS – RonYamin Oct 18 '14 at 17:22