I am currently a little worried about the following issue. I have a user interface that basically shows graphics (canvas of lines, circles, ... these are all WPF objects). Depending on the choice the user makes in the menu, some items are deleted and some are added. Thus, the main image looks the same, but several changes have been made.
The user has the opportunity to select - say - 10 different "pages" by clicking the "Next / Previous" button.
I am using MVVM Light, and my ViewModel contains all graphic elements (all lines, ...).
Now I would like to print this graphic on several pages. The first page should contain graphics with changes from page 1, the second page should contain graphics with changes from page 2, etc. The actual number of pages is dynamic. I track this using the CurrentPage property and the PagesTotal property. Whenever I click the "Next" button, this will execute a command that will change the CurrentPage variable, and also make sure that the correct elements are displayed.
Now I would like to print this, but this is where I am stuck. I do not want to leave the MVVM zone and do some dirty work in the code, but I would refuse to draw everything again, as in the old days of GDI.
Any ideas are really welcome.
source
share