Drag-and-Drop Target

Silverlight 4 introduced the ability for your application to act as a drop target for files that have been dragged from the desktop or Windows Explorer. This feature is even available when the application is running within the browser. This provides an alternative means for reading a file from the user's file system, without the user having to go via the open file dialog. For example, you might want to create a file uploader, where users can drag files onto your application and have them automatically uploaded to the server.

The first step when implementing this feature is to decide where you want files to be able to be dropped within your application. For this simple demonstration, let's enable the user to drop a file on ...

Get Pro Business Applications with Silverlight 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.