< Canvas>
< Thumb Name="myThumb" Canvas.Left="80" Canvas.Top="80" DragDelta="onDragDelta">
< /Canvas>
private void onDragDelta(object sender, System.Windows.Controls.Primitives.DragDeltaEventArgs e)
{
Canvas.SetLeft(myThumb,Canvas.GetLeft(myThumb)
+e.HorizontalChange);
Canvas.SetTop(myThumb,Canvas.GetTop(myThumb)
+e.VerticalChange);
}
I have placed the Sample Code Here.
No comments:
Post a Comment