Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - How to dynamically generate XPS pages / subclass DocumentPaginator

 
 
Old 10-17-2006   #1 (permalink)
Jens


 
 

How to dynamically generate XPS pages / subclass DocumentPaginator

Hi all,

I would like to use DocumentViewer Control to display XPS like documents. As
my documents may contain several thousands of pages it is not feasible to
generate them all in advance. I need a way to create pages on the fly when
they appear in the control.

For retrieving pages from the document there exists the DocumentPaginator
class. For my purposes I would need my own implementation of this class that
overrides the GetPage() and GetPageAsync() methods and implement it in a way
that a requested page is generated on the fly. This class is abstract so
custom implementations should be possible.

But my problem is: How can I make my FixedDocument aware of my derived
DocumentPaginator? FixedDocument has the DocumentPaginator property but no
setter method.

My workaround was to derive my own class from FixedDocument containing my
paginator and to override the getter of the DocumentPaginator property. But
this does not work. The control just remains empty (strange enough I would
not FixedDocument at all, just the paginator would be sufficient, but then
DocumentViewer control complains that it only supports FixedDocument and
FlowDocument types...)

Dynamic generation of pages should not be such an exotic requirement. Did I
miss something?

Thanks for any help

Jens


My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
xaml subclass??? .NET General
Base class defined and initialized variables loose initialization in subclass. .NET General
dynamically create variable? PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46