Hi, I want to download a pdf file form silverlight application , the pdf file is in a folder in my solution , i want to give the path of the pdf to the method and it should download the pdf to the local system. i am happy to say that i achieved it with the following code:
SaveFileDialog dialog = new SaveFileDialog();
                dialog.Filter = "pdf Files|*.pdf";
                dialog.DefaultFileName = "BeneficiaryDesignation.pdf";
                if (dialog.ShowDialog() ?? false)
                {


                    WebClient webClient = new WebClient();
                    webClient.OpenReadCompleted += (s, e2) =>
                    {
                        try
                        {
                            using (Stream fs = (Stream)dialog.OpenFile())
                            {
                                e2.Result.CopyTo(fs);
                                fs.Flush();
                                fs.Close();
                            }
                           
                        }
                        catch (Exception ex)
                        {
                            MessageBox.Show(ex.ToString());
                        }
                    };
                    string str = App.Current.Host.Source.AbsoluteUri;
                    string path = App.appConfiguration.GetPDFPath("BeneficiaryDesignation.pdf");
                    str = str.Replace("/ClientBin/ProjectDemo.xap", path);                    
                   
                    webClient.OpenReadAsync(new Uri(str), UriKind.RelativeOrAbsolute);
                }

HostForLIFE.eu Silverlight 6 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.