The SaveFileDialog in Silverlight lacks a DefaultFileName property, resulting in the user having to enter the file name manually with every file download from a Silverlight application.
This is very anno开发者_StackOverflow中文版ying and there's a lot of criticism about this, see the Silverlight forum.
My question is: what is the most elegant way to get around this?
Prepare the download and let aspx handle the download for you:
http://strugglesofacoder.blogspot.com/2011/03/alternative-to-saving-file-in.html
I'll add one suggestion as an anwser myself, which I picked up from the mentioned forum:
Copy the file name to the clipboard so users only have to press Ctrl-V in the dialog.
精彩评论