OpenLightGroup Blog

rss

Blogs from OpenLightGroup.net


Silverlight 3 Drag and Drop updated

image

I finally got around to updating the Silverlight 3 Drag and Drop sample to use the latest Tim Heuer's Floatable Window.

His latest version fixed the problem with the left side moving while dragging the window to the right. We will work on this in the coming weeks as we prepare to eventually incorporate this into SilverlightDesktop.net. Our desire is to make Floatable Window work in SilverlightDesktop.net without modifying Floatable Window. This will allow SilverlightDesktop.net to benefit from future enhancements with Floatable Window.

You can see the latest version and get the source code here:

http://www.adefwebserver.com/DotNetNukeHELP/Misc/Silverlight/Silverlight3_DragAndDrop/Default.aspx





Comments are closed.
Showing 2 Comments
Avatar  Michael Washington 8 years ago

SilverlightDesktop.net has an API that supports a lot more than Drag and Drop. Drag and Drop is just a part of what it does. We looked at other Drag and Drop frameworks and they all made assumptions of what should happen during the drag and what happens when you do a drop.<br><br>This is actually restricting and is not a good thing. We actually do NOT want to define a "programmatic contract" because we don't want to restrict ourselves and prevent us from using some future Silverlight features.<br><br>If we use a Behavior, that Behavior is a "contract". If it wasn't programmed to handle something it can't do it. This is fine for most situations but not an evolving Framework like SilverlightDesktop.net when the current method works just fine.

Avatar  Charlie Robbins 8 years ago

It's a very good looking demo, but I think you're doing it wrong. Why not encapsulate all of the Drag Drop behavior into an Attached Behavior so that it can be used across multiple UI containers? That's what I've implemented with (and without) System.Interactivity:<br><br><a href="http://github.com/indexzero/silverlight3-samples/tree/master" rel="nofollow">github.com/indexzero/silverlight3-samples/tree/master</a>