4 Answers, 1 is accepted
RadUpload control contains a built in button opening the file dialog. In Silverlight, opening file dialogs must be initiated by a user interaction due to security considerations. Thus we have imbued the opening button inside RadUpload.
If you however want to open the file dialog from the MVVM you could employ some of the following:
1) Using an interaction service, more info here http://msdn.microsoft.com/en-us/library/gg405494(v=pandp.40).aspx
2) Inject the methods used for dialog opening - a simplified variation of the above, more info here http://www.deanchalk.me.uk/post/WPF-MVVM-e28093-Simple-e28098MessageBoxShowe28099-With-Action-Func.aspx
Also a quick search on Google about MVVM and popups (or messageboxes) will bring a tons of results related to your solution.
Hope this helps, please let us know if you need further assistance.
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Thank you. It helps me alot
When i try to upload a file with the "normal" upload dialog in silverlight, i've got a Security Exception. To resolve this, i have to trust my application with a certificate and run the application in elevated trust. Is this also needed if i use your RadUpload control or do you "fake" this Upload call with some json or anything else?
Thx for your feedback
The RadUpload control sends a request to the RadUploadHandler which is essentially an HttpHandler. It allows you to select files from the client machine and then it creates a collection of RadUploadSelectedFile objects and each object contains the name and the FileInfo describing the file selected by the user.
This is why you should be able to upload the files out-of-the-box.
the Telerik team