by Michael Wolf via Michael Wolf on 11/19/2009 9:15:07 AM
One of the exciting announcements made at pdc 09 was that silverlight 4 will support drag and drop from the desktop to both the web and out of browser. Whats great too is how similar the process is to WPF, the object properties are exactly the same, the only difference is 1 line in the actual file opening. Thus by sharing a common code, you can leverage this functionality in a full desktop experience as well as a silverlight experience with the exact same code. The key difference being that in WPF you get as the drop data the filenames as a string[] and then you need to open the file, where as in silverlight what you get is a FileInfo[] ready for you process. The code snippet below shows this in action, and 2 routes to process the drop, one using conditional compilation the other simply looking at the type of data being provided. Whats exciting about this is how this really helps bridge the web and desktop divide in the browser. In the out of browser scenario it will give our experiences a more true desktop feel that you are currently able to provide in true desktop apps in wpf or adobe air. Looking forward to all the bluing the lines experiences we will be able to create using silverlight 4.
Original Post: Silverlight 4 Drag from desktop
The content of the postings is owned by the respective author. Silverlight Feeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on Silverlight Feeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.