Saturday, January 29, 2011

Silverlight drag and drop issue

This week , I upgrade our project to silverlight 4, you know silverlight 4 is on the market for a long time, but unfortunately , we are still using silverlight 3.0, constrained by the infrastructure. cause it is not easy to change our build server.  finally now it is silverlight 4.

Once I finish up the upgrade, I came across a drag and drop issue. In silverlight 4, when I move mouse on the top of a ListBoxDragDropTarget, even me mouse left key is not down, but sometimes, it just start to drag....Which might cause a lot problem.  after some search , it turns out it is a bug of silverlight 4 toolkit, and I found a solution here  http://silverlight.codeplex.com/workitem/5930 , this solution works for me.

2 comments:

  1. Hey Johnny, it's really nice to know that you guys are on SL4 now. It's a relief to see a work around for the drag problem.

    I encountered this problem when I was experimenting SL4 on the project before, and I digged into it with no resolution found by that time.

    All of the drag drop target controls are implemneted with the RX framework from MS which uses "LINQ to events" to describe the behaviors.

    The main dev who's implemented them is not in the SL team now but he has a blog that contains details about the drag drop target behaviors: http://themechanicalbride.blogspot.com/.

    When I peaked into the Toolkit source code, I realised that his RX LINQ queries were not changed in the new version of the Toolkit. So it must be something in the SL runtime that causes the same query to be delayed in certain cases, and resulted in the problem.

    Anyway, it's nice to know there's a fix now :)

    ReplyDelete
  2. But to be honest, the drag and drop in SL4 is worse than SL3, although this issue have a fix, but the performance of drag and drop of SL toolkit is bad. I am trying to change your drag and drop to using telerik. but telerik give us more control but also required us to do more job

    ReplyDelete