Printing multiple pages in Silverlight (4.0)?

I am trying to print a grid that will contain multiple pages from Silverlight 4.

The grid consists of a β€œheader section” (another grid with the date, image, etc.) that I needed to look for, and an ItemsControl control with a data template whose source source is set to the observed collection of objects.

All that I have installed in the code so far is PageVisual (to the grid), but all I get is the first page. Therefore, I believe that I need to install HasMorePages (since the default is False).

But for this, is it true, I need to calculate # pages in my code based on # objects in my observable collection? For example, by iterating over a collection and creating a uielement for each in a new stack pane or the like? Or am I missing something?

Also is there a way to use the header section that I already created? I tried a loop through the collection, as mentioned above, but if I try to add a title grid to the new stack pane, it says that it is already a child of another element. I do not want to create a header in C # code, since this is already a layout in xaml. Any ideas?

thank!

+3
source share
1 answer

check this:

Silverlight Business Apps: Module 6.2 - Multipage Printing

http://channel9.msdn.com/learn/courses/Silverlight4/SL4BusinessModule6/SL4LOB_06_02_MultipagePrinting/

0

Source: https://habr.com/ru/post/1762378/


All Articles