Hi Jens,
In answer to your questions:
For #1: I'm not certain if we understand your question. If you're
looking to do a "stamp" type annotation using an image as a background
on the annotation, you may be able to do this through styling to set a
background image. An Annotation Styling sample has just been added to
the SDK and will be available shortly at MSDN on-line. A preliminary
version of the annotations styling sample is available at Derek
Mehlhorn's blog at http://blogs.msdn.com/mehlhorn/default.aspx.
For #2: Yes, DocumentViewer does automatically virtualize content, so
only the pages visible are loaded into memory at runtime. For an
example of dynamically creating and writing an XPS document see the
"Creating an XPS Document Sample" at
http://windowssdk.msdn.microsoft.com.../ms771596.aspx.
For #3: Yes, DocumentViewer supports Hyperlink navigation when it is
inside an object that is a NavigationService
(http://windowssdk.msdn.microsoft.com....windows.navig
ation.navigationservice.aspx), such as Frame
(http://windowssdk.msdn.microsoft.com....windows.contr
ols.frame.aspx) or NavigationWindow
(http://windowssdk.msdn.microsoft.com...ms615518.aspx). You
can attach an event handler to the Frame.Navigating
(http://windowssdk.msdn.microsoft.com....windows.contr
ols.frame.navigating.aspx) event or NavigationWindow.Navigating
(http://windowssdk.msdn.microsoft.com....windows.navig
ation.navigationwindow.navigating.aspx) event for special handling of
hyperlink navigations. (For more information see the Navigation
Overview at
http://windowssdk.msdn.microsoft.com.../ms750478.aspx.
Thanks for your interest in .NET 3.0!
Jack Davis
Microsoft Windows Client SDK
-----Original Message-----
From: Jens
Posted At: Friday, September 29, 2006 1:53 AM
Posted To: microsoft.public.windows.developer.winfx.avalon
Conversation: DocumentViewer, annotations and XPS
Subject: DocumentViewer, annotations and XPS
Hi all,
I had a quick look at the DocumentViewer control and the usage samples
in
SDK. It is a promising approach for my application to build a viewer
showing
various document formats by first convertig them to XPS and use this
control
for display and print. Some general question regarding the design of my
application:
1) Annotations
The samples also demonstrates using annotations. But I have the
requirement
to display an extendes set of custom annotations (graphical objects,
stamps,
etc.) Is it intended by the design to integrate custom annotations in
the
framework? What would be the way to do this? Derive from
System.Windows.Annotations.Annotation?
2) dynamic XPS creation at runtime
When I have documents containings several thousands of pages it is not
feasible to download them completely.
Does the control suppport dynamic generation of individual pages at
runtime?
Is there a mechanism like UI virtualization built in to support this?
The
scenario is: User triggers command display page 3411, application should
render this single page to XPS and display it.
3) Hyperlinks
Does the XPS spec and the DocumentViewer control support some form of
hyperlink where the application intecepts the activation of the
hyperlink and
processes it.
Any help hints or available sample code would be appreciated.
Thanks Jens


