I can t comment too much on the Silverlight Toolkit, but I can on Rx.
The Reactive Extensions (Rx) are a general purpose set of libraries to enable "lifting" of various "push" collections (events, async operations, etc) into a first-class, LINQ-enabled, compositional framework. It is available for Silverlight, XNA & javascript, but more importantly for .NET 4.0 & .NET 3.5SP1 so it can be used with WPF. (The .NET 3.5SP1 implementation even back-ports much of the parallel task library which can be extremely useful even if you don t use the core Rx code.)
That said, because Rx is general-purpose, and if you can do drag-and-drop using events in WPF, then you can use Rx.
A drag-and-drop query would look something like this:
var mouseDowns =
Observable.FromEvent<MouseButtonEventArgs>(element, "MouseDown");
var mouseMoves =
Observable.FromEvent<MouseEventArgs>(element, "MouseMove");
var mouseUps =
Observable.FromEvent<MouseButtonEventArgs>(element, "MouseUp");
var mouseDragPoints =
(from md in mouseDowns
select (from mm in mouseMoves.TakeUntil(mouseUps)
select mm.EventArgs.GetPosition(element))).Switch();
var mouseDragDeltas =
mouseDragPoints.Skip(1).Zip(mouseDragPoints, (p1, p0) =>
new Point(p1.X - p0.X, p1.Y - p0.Y));
I ve quickly thrown this code together without testing it, but it should give you a observable of the Point
deltas from the original drag starting point and it will do so only during a drag operation. I ve tried to keep the code simple. You d need to modify for your specific needs.
If the Silverlight Toolkit provides anything further then it will just be a relatively thin layer of helper methods that you could either re-invent or use Reflector.NET to extract out and use in your app.
I hope that helps.