Click here to Skip to main content
15,891,136 members

Comments by MehdiNaseri (Top 14 by date)

MehdiNaseri 2-Aug-13 21:58pm View    
Reason for my vote of 5 \n Simple but effective method.
1) You can eliminate these two lines of code:
FirstArrowXPos = e.GetPosition((sender as Control).Parent as Control).X - FirstXPos - 20;
FirstArrowYPos = e.GetPosition((sender as Control).Parent as Control).Y - FirstYPos - 20;

2) Also use respective canvas margins instead of 20 , like this:

(sender as Control).SetValue(Canvas.LeftProperty,
e.GetPosition((sender as Control).Parent as Control).X - FirstXPos – ConvasName.Margin.Left);

(sender as Control).SetValue(Canvas.TopProperty,
e.GetPosition((sender as Control).Parent as Control).Y - FirstYPos - ConvasName.Margin.Left);
MehdiNaseri 12-Apr-12 19:41pm View    
Thanks
MehdiNaseri 12-Apr-12 19:41pm View    
Deleted
Thanks
MehdiNaseri 11-Apr-12 22:26pm View    
I think you should post a tip/trick about how to make this link: http://bit.ly/IQX6l5 :D
MehdiNaseri 11-Apr-12 18:58pm View    
+6 :D