I want the user to be able to move items freely in a canvas.
My app is using Caliburn.Micro.
My MainViewModel has a collection if Items :
public
If you're wondering how to do it in a nice way, then I would say that you're looking something a long of the lines:
where MouseButtonMoved
is an attached property (of type ICommand
) that hooks itself into the ItemsControl
MouseButtonMove
event, and then executes the the command it is binded against, passing two double values (x, y)
through the MouseButtonMoved.Execute(x, y)
.
If you want to see similiar implementations, check for gongdrop implementation. I'd use that as a solution, but if you want to rewrite it from zero, just read the source.