C# WPF Printing - The UserControlPager Setup

preview_player
Показать описание
C# WPF Printing - The UserControlPager Setup
(There is no Audio)

How to setup the UserControlPager object class ready for use.

Update: 12-Mar-23
Unfortunately, the UserControlPager library is a private project, not inside Visual Studio, and a Google search will probably just point back here. The example UserControls can be used without the library and without implementing any interface. What a con? then please read on.

The UserControlPager object was created as a proof of concept solution to the problems of printing a DataGrid. Some of the back story is in the description of video no. 1, "C# WPF Printing - The Big Secret".
To be fair, the version one of any source code is generally not fit to share anyway. It may have private comments not for sharing, or just be in a state not easiest to understand or to later explain.

So why display the videos without the UserControlPager source code?
Well, I doubt many would go through and rewrite, restructure and comment the version one source code, if there was little interest in the examples of what it does. (See Update 02-May-23)
Anyway, the purpose here is to share the tricks and knowledge to help your printing journey.

That is not to say that the UserControlPager won't become public. In fact, there are already some sanitised rewritten methods in the videos.

Still, without actually displaying the UserControlPager, we have managed to share :
• UserControls can be printed as they are - you don't need to recreate them using Table, Paragraph, Inlines and Run objects.
• Examples of UserControl based page layouts
• How to create and print a UserControl
• How to measure and position UserControls on a fixed page.
• How to print a DataGrid if you can restrict it to fit the page content area.

Which ain't that bad.
Enjoy.

Update: 02-May-23
After restructuring and commenting the source code for the UserControlPager class.
You may like to view the videos named below for more UserControlPager Source Code:
C# WPF Printing - The UserControlPager CreateDocument Code
C# WPF Printing - The UserControlPager Headers & Footers Code
Рекомендации по теме
Комментарии
Автор

Hi there. Sorry, but I cannot find anything about UserControlPager, either at Google or inside Visual Studio. Where should I have this library available? Thanks in advance.

pabloaguirre