1

需要一些帮助。

  1. 当我们更改 FlowDocumentPageViewer 中的页面时是否有任何事件
  2. 在 FlowDocumentPageViewer 中放大/缩小时是否有任何事件

最好的,巴拉。

4

2 回答 2

1

我们在 FlowDocumentPageViewer 中更改页面时是否有任何事件?

是的。每当您更改页面时,FlowDocumentPageViewer.MasterPage 都会更改值。由于它是一个 DP,您可以将自己的 DP 绑定到它,并在您的 DP 上处理 PropertyChangedCallback。

在 FlowDocumentPageViewer 中放大/缩小时是否有任何事件?

是的。每当您更改缩放时,FlowDocumentPageViewer.Zoom 都会更改值。由于它是一个 DP,您可以将自己的 DP 绑定到它,并在您的 DP 上处理 PropertyChangedCallback。


例子:

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

MyControl上定义的 DependencyProperties 的位置MyZoom和位置。MyMasterPage

于 2009-11-19T08:53:01.770 回答
0

对于母版页,您可以在 FlowDocumentPageViewer 控件模板的 DocumentPageView 中处理 PageDisconnected 事件。更改母版页时将引发此事件。在事件处理程序中,您可以将 DocumentPageView.PageNumber 与您存储的页码值进行比较。

于 2011-10-04T09:27:35.023 回答