none
Free Flow Drawing in SL4

    Question

  • Hi , 

     I want to draw any path (like map of a city) on any given Cities map(as Image) in SL4.

    and store this path coordinate(Data) in Database.So that we can manipulate some informations onto that map.

    If any body know this logic . Please tell me .

    Regards

    Rajesh 

    Friday, April 13, 2012 10:51 AM

Answers

  • Hi Rajesh ,

       See my post  http://social.msdn.microsoft.com/Forums/en-US/silverlightgen/thread/dea7ad96-722f-4f0c-9ac0-a03fa9455906#1fd690ac-196f-4f3c-84f1-64185085abfa

       Lets say you have a List<Point>  mypoints.

       In that , just change the c_MouseMove  method to store the data points in the list.


    void c_MouseMove(object sender, MouseEventArgs e)
           
    {           

                    endPoint
    = e.GetPosition(LayoutRoot);
    mypoints.add(endPoint);

                    p
    = new Path();
                   
    LineGeometry pg = new LineGeometry();
                    pg
    .StartPoint = startPoint;
                    pg
    .EndPoint = endPoint;
                    p
    .Stroke = new SolidColorBrush(Colors.Green);
                    p
    .StrokeThickness = 2;
                    p
    .Data = pg;
                    c
    .Children.Add(p);

    startPoint = endPoint;
               

           
    }

    Hope this Helps  Laughing   { or atleast gives you the general idea to solve it }

    Friday, April 13, 2012 12:23 PM