需要一些帮助。
最佳, 巴拉。
答案 0 :(得分: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}}"
...
MyZoom
和MyMasterPage
是MyControl上定义的DependencyProperties。
答案 1 :(得分:0)
对于母版页,您可以在FlowDocumentPageViewer控件模板中的DocumentPageView内处理PageDisconnected事件。更改母版页时将引发此事件。在事件处理程序中,您可以将DocumentPageView.PageNumber与存储的页码值进行比较。