For an application i'm developing as my first c# project, i'd like to be able to print information from the application in a similar style as the 'card style' printing option that's available in outlook.
I've created a User control that is layed out the way i'd like to print it and am able to add that control as often as needed to a form in the two column layout that i want, but so far haven't found a working tutorial/example explaining how to print the contents of the form including the visual elements (adding page breaks, without breaking the layout of the user control).
Any advice or pointers in the right direction would be appreciated.
Related
I am working on a WPF app with a header that consists of a progress bar, date and time, and status. This app also contains a Footer with 5 buttons to navigate between different screens (settings, results, products, etc.). I did this originally by making the navigation button bar a usercontrol and all other content is in seperate windows. I am not entirely happy with this and am sure there is a better way. Is it better to have a main screen with only the header and footer and do all other content as seperate user controls? Or should all windows stay seperate and show the user controls for header and footer on initialize. I currently have the latter but it requires me to track what windows are open to keep from opening more than one of the same. I also think it may be more manageable to have the main entry point and window settings and just aadd content to center section. Any advice on best way to achieve this is appreciated.
I'm going to explain my experience with your problem and how I solved it.
What I can suggest is to create custom controls for footer and header.
Then create a page control that inherits from Page named CustomPage for example, and put footer and header layouts inside CustomPage layout.
Then create another and last control inheriting from CustomPage named for example CustomPageContent. This page will present footer and header and you will customize it with specific content for every different page. You will have at this point all functionalities from Page Control and all logic for navigation will be supplied. You will be able to controll this contents as a frame.
I think that this solution will give you a little bit work but is a really elegant solution and your code will be simplyfied.
Hope will help!
Does anyone know of a C# WinForm or WPFcomponent that I can use as a "Word-Blank-page" control?
I need that the my user at runtime see a whit-blank-page that can manipulate by having basic text editing (bold, fonts, color), basic tables and images placed everywhere on the "canvas" (the white page).
The component should give me an API, so I can react on user actions on the component, like when right clicking on table or an image (I will display different forms depending on the object clicked).
I look for some extension of the RichTextEdit control from different vendors, but any of those can give me the functionality I need.
Any suggestion is welcome.
Flow documents is a good way to go. They are thoroughly documented by Microsoft.
They provide all the functionality you mentioned and then some. Code Project has some good examples on how to use flow documents. You can check this beginners guide for starters.
We are currently looking to create a text-editor in WPF (.NET 4.0) which will allow writers within our team to create movie scripts. In short, the functionality should ressemble that of FinalDraft or Adobe Story (i.e.: contextual positioning of text depending on the cursor's position and user intentions)
We are currently looking at two different solutions design-wise:
One WPF control which will act as the container, and multiple small text-editing controls which will represent rows within the script. This will allow us to position the controls using their margin, while also making binding easy. The challenge here would be the handling of multi-line selections. I was thinking of using a Listbox as the container, and each listbox item would be a custom control containing a textbox. This would require the instantiation of controls depending on the user's action. Everything would be skinned to give the impression that the user is working on a blank page.
One big textbox capable of displaying custom XML data. The challenge here would be to determine where exactly the cursor is located (i.e.: is the cursor on top of an actor's name, etc.) and positioning the text appropriately (i.e.: actor names are centered and in caps, etc.)
I recently tried implementing the first solution, but having to re-implement the whole selection behavior that is built-in in basic text boxes is non-trivial and requires a lot of work. As for the second solution, binding to my business objects will be much harder than simply instantiating multiple controls with different bindings.
Do you have any other solution in mind ?
I needed a text editor for a application once. We had a big xml file for settings and the user should be able edit those.
Turns out , if your file is large enough (+ 10000 lines) the rich text box is getting pritty slow.
As for building a gui mask : only if your user wirtes some short options like text. But is i understand you want your useres to write creativ text. This "mask" gui - "lot of small places" will make them feel like they are in the 80ties.
I suggest: Dont write the Programm , only write a Plugin to an exitings editor. Some are free like:
http://www.codeproject.com/Articles/42490/Using-AvalonEdit-WPF-Text-Editor
or an add in for word - people love Word and know Word
http://www.codeproject.com/Articles/8837/Writing-a-Word-Add-in-Part-I
And for binding data and the like: Once the text is written, the user just need to press the save button and you can parse the input for information. I would not do it on the fly as it can get pretty slow. Also you say that the information is linked so only if all the data is written you can make use of it.
I need to implement a custom print preview screen for one of the pages in my MVC web project. I was just wondering what some of the recommended ways of doing it are. Basically, we have a dropdown menu with a bunch of different options-- each one displays a different statistical report under the dropdown menu. For the print preview, I only want to preview the report, not the whole page.
Should I simply take the html and cut off the stuff I don't want, and re-render it? Or create some kind of other document, XPS maybe, and display it as that? Alternate CSS maybe?
Not that anyone is probably interested, but I ended up just using the HTML from the original page and disabling/restyling all of the links and stuff, and hid unnecessary elements via javascript.
I am developing asp.net with c#web application.
I want to have a control in ASP.net that has text formatting controls as well as a ruler to edit the text which i enter in text area. It would be great if i can open Msword in a web browser without Save buttons at the client side.The data must be saved into the database.
The control should be similar to the one which i get while writing this question.and also e.g gmail compose mail.
My main aim is to provide right and left indentation to the text that is being entered and i want to preview on A4 size paper.
Please guide me someone the way to proceed.I got Htmleditor ajax control but it doesnot have a ruler.
You may take a look at WMD (this is what you are using for typing this question). You could also take a look at the many other alternative editors and pick one that suits your needs.