I'm new to WPF. I have a WPF application and I need to render an already existing excel file(section:-Batch Control Ticket). What I need to show in the WPF app is what exactly appears in the excel file. I know we can do it in a different way by loading the excel file in the C# code and mapping it in to a DataGrid. But it will not give the exact appearance of the file. I have seen some 3rd party availability but I need to purchase them and cannot be sure of their reliability. What can I do? Are there any tool available in WPF or a recommended other? The image shows how I need the app to appear.
Related
Currently we're making a c# application (using WPF) and everything goes well. The only problem we have right now is that we want our application to be able to print documents directly from our application to the printer.
What we need to print is a list of customers, but not listed on a sheet, instead it should print 1 full page of information from every customer that yet haven't been printed. The document should also contain some formatting such as a "Result" section where you manually fill in information using a pen later on.
I've found several solutions but they all require us to either use iTextSharp and have Acrobat Reader installed. This way works but just complicated things for later on as some of our teachers doesn't even know what google chrome is, and less so even grasp the concept of having to install acrobat reader to be able to run this program.
Our other option is to create a simple report directly in c#, but all the tutorials use windows forms and a datagrid which doesn't feel very effective for what we're trying to achieve. Also we can't find reports in the "add new" menu for the solution explorer and we're not using windows forms.
Basically we want to press a button which automatically prints all the new customers that yet haven't been printed out. We're all good with the other backend stuff like marking the customer to not be printed again and so on, it's just the actual document formatting that've had us stuck for days now. I've searched for "c# create invoice" and so on, but every tutorial uses windows forms or Crystal Reports while we can't.
Any suggestions?
I have a WPF application that opens excel macros with the code
Process.Start("C:\\My Library\\MyFile.xlsm");
Now I want to run this sheet inside the WPF application. Is there any chance to open the excel sheet in a new WPF window, and run the macro?
Thanks for your help in advance.
It is not possible out of the box, to achieve such thing. You need to dig deep in msdn documentations about controls and libraries and how to reuse them.
So, I will suggest that you can use a third party "excel style" control.
You can check in this tutorial with a free tool - Spreadsheet Control.
I'm trying to find a package, or a solution that allows me to create custom layouts to present data. Similar to how one can create custom templates and layouts in Microsoft Word.
I've tried a RichTextBox but they are very limited. I want to create numerous custom layout types to present the data within my software and have the user select one they wish to use, with the option of printing.
Is there anything that will allow me to do this?
This is for a WinForms application.
The layouts will be designed by myself, and added into the software. The layouts will be used to present the data. Mainly for aesthetics. The application allows the user to enter their information for a CV and they can select a layout for their CV.
Hmmm. I would suggest WPF if you were not committed to a WinForms application.
Instead you can use HTML and swap out the CSS (cascading style sheet) on the fly. You will need to use a WebBrowser control to host the html (http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser(v=vs.110).aspx).
Otherwise you could creat several controls that could bind to the same data object and swap the controls out. I like the HTML option better myself.
I'm working on a windows forms application that reads and displays source code files from my hard drive. I'm not sure which control would be best suited for this. Is there any library that will allow me to display the source code with colors and numbered code-lines?
EDIT: To clarify, what i'm looking for is a way to display the code with colors and line-numbers, no need for editing. The application is to be used by a teacher, allowing him to view source code files handed in by his students. The teacher doesn't have to be able to edit the files.
ScintillaNet is a WinForms control which is a .NET wrapper of the excellent Scintilla library and is quite good. Avalon which is mentioned in another answer is also very good, but it is an WPF control (of course, WPF controls can be added to WinForms forms by using ElementHost controls, but it will introduce additional complexity which may or may not be warranted).
It's my first post, so if I’m posting wrong or something, please let me know!
I'm developing an application in C# where I have to stream picture and sound from an IP Camera.
I have found a SDK from the manufacturer of the IP camera which should make it possible to integrate the streaming process into an application.
The IP camera is a LevelOne FCS-0010, and the SDK contains an .OCX file, an .INF file and a PDF file, which describes the different configuration parameters for the .INF file.
And here's my question: how do I use the OCX file in my application?
According to some forums, the OCX can just be drag 'n dropped into the toolbar in VS and then drag 'n dropped onto a WinForms form. This actually goes pretty well!
But then I just get a clean ActiveX object into my application, nearly just blank. Probably the OCX component needs to be configured, but how?
I guess I have to use the -INF file in some way in my application, so the OCX component could be configured. However, I really can’t figure out how.
It has to be registered first, use the vendor's recommended install procedure. Then you need to generate a AxHost wrapper for control, that allows it to be placed on a Winforms form or a WPF ElementHost.
Two ways to do that. Right-click the toolbox, Choose Items, COM tab and pick the control from the list. Which might be hard to do or not work at all if you don't know the name of the control. Second way is to run the Visual Studio Command Prompt and type aximp foo.ocx. That produces an AxFoo.Interop.dll, you can put it on the toolbox through Choose Items, Browse tab.
Not every ActiveX control is compatible with .NET, window-less controls are not supported.