tags:

views:

80

answers:

1

Hi,

Needed some help.

  1. Is there are any events while we change the pages in the FlowDocumentPageViewer
  2. is there are any events while we zoomIn/zoomOut in the FlowDocumentPageViewer

Best, Bala.

A: 

Are there any events while we change pages in FlowDocumentPageViewer?

Yes. FlowDocumentPageViewer.MasterPage changes values whenever you change pages. Since it is a DP you can just bind your own DP to it, and handle the PropertyChangedCallback on your DP.

Are there any events while we zoom in/out in FlowDocumentPageViewer?

Yes. FlowDocumentPageViewer.Zoom changes values whenever you change the zoom. Since it is a DP you can just bind your own DP to it, and handle the PropertyChangedCallback on your DP.


Example:

<FlowDocumentPageViewer
  Zoom="{Binding MyZoom, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor,MyControl,1}}"
  MasterPage="{Binding MyMasterPage, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor,MyControl,1}}"
  ...

Where MyZoom and MyMasterPage are DependencyProperties defined on MyControl.

Ray Burns