File System Open and Save Dialogs

Isolated storage is the primary means Silverlight provides to store and retrieve data locally on the user's machine, but sometimes you need to read and write to actual files within the user's file system. For example, you may want to save a file that was downloaded from the server or upload a file to the server from the user's machine.

As part of the Silverlight sandbox, you can't read or write files directly from or to disk without user interaction, unless you have elevated permissions (discussed later in this chapter). Instead, you need to display an open/save dialog first to gain explicit permission from the user to read or write a file. Let's take a look at how you use these dialogs, and the file based operations ...

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.