views:

21

answers:

1

hi ,

i want that at run time i can move any control in using mouseclick, i think i have to apply logic in mousedown and mousemove event but how can i apply this logic in WPF i tried this logic in simple C# desktop application but how can i achive in WPF

+1  A: 

IMO the easiest thing (because of the events it pre-defines) would be to wrap your control in a Thumb object and respond to the DragDelta event; use the HorizontalChange and VerticalChange properties of the DragDeltaEvent to adjust the Top and Left properties of your Thumb.

DrPizza