I have a series of Files (word, pdf, ect) that are stored in my application and the idea is to allow the end user to download these files at their choosing. How is this done in silverlight? I tried using a SaveFileDialog but I must not be doing it correctly. Thanks!
Related
I'm trying to make my program have the ability to display a Microsoft Word file on a form but not having any luck in doing so. I want to be able to open the file and display it on the form as a Read-Only. So basically just display it's contents. Various users on the web have recommended displaying files in the WebBrowser control (under toolbox). I have tried this but failed to get it working. My end goal is to be able to annotate on top of the web browser (or something of similar manner) and subsequently save the annotations along with the opened file.
I'm not that experienced in the C# language too so any help on how to achieve my problem would be greatly appreciated.
I have a WPF application and I want to be able to print PDF document, but I don't want use the Adobe Reader (because I don't know if on client machine adobe was installed). Is there another way to print pdf in different manner programmatically in C#.
you can use cmd command to print, so in your program use exec... more info here
or then here in C#
I need to create silverlight application where customer will see some pdf files.
PDF files have to be inside silverlight control and not rendered as images (customer wants to select text)
For this purposes i need some free libriaries or code to convert pdf file to xaml (or just open pdf so i can convert it to xaml).
Which library can read pdf and help me to convert data to xaml?
Can I read somehow pdf file and write custom convertation tool?
I saw iTextSharp. Is this library can read pdf and help me with my issue?
I will be thankfull for any ideas or links.
I make use of the Acrobat Reader plugin to do the displaying for me. It does require a different method depending on whether your application is running inside or outside the browser (I check if the application is running inside the browser and change the means of display accordingly). If running inside the browser, I overlay the application with an IFrame, as I describe in this article: http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-6.aspx. Otherwise, I use the WebBrowser control. I have a control which does this all for you in the source code that accompanies my book, which is downloadable from the Apress website here: http://www.apress.com/9781430272076/.
Hope this helps...
Chris
I have a visual c++ windows form application (empty) made on visual studio 2008
I would like to add a button so users can browse a folder.
after they select the folder I would like to "scan" that folder and list all the images (JPG, PNG and GIF) in my windows form application.
can anyone provide me with the steps required ?
Thank you
I am not sure if there is any automatic way to scan image files but since you have only 3 extensions, you could try the following per extension,
string[] imageList = Directory.GetFiles(path, "*.jpg");
where path is the folder you browse to using the browse folder dialog (NOT the browse file dialog).
It returns a string of all the files in the directory along with their full paths. Optionally you can trim of the path using a simple .Split('\') command.
I'm not sure if the string[] will work in C++ as the syntax seems to want the hat symbol, as seen below.
array<String^>^imageList
Here is the link for the getfiles method.
I have a certain config.xml file in one of my projects (Silverlight class library) in a folder in the solution. It's build action is set to content. In that same project I am trying to load the xml file by saying:
XDocument xml = XDocument.Load("/config.xml");
This unfortunately is not working. Upon inspecting the xap file, I see that the xml file is not being copied to it. I am using Visual Studio 2010 RC.
You need to include the file marked 'Content' in the main application's project to get it to show up in the .Xap. If you control the main app, you could link in the .xml file and mark it as Content.
If you can't do that, mark the .xml file as an Embedded Resource, it's less flexible and will be built into the .dll, but that is your only other option.