使用FlowDocumentPageViewer WPF的事件
我需要一些帮助使用FlowDocumentPageViewer WPF的事件,wpf,flowdocument,Wpf,Flowdocument,我需要一些帮助 在FlowDocumentPageViewer中更改页面时是否有任何事件 在FlowDocumentPageViewer中缩放/缩放时是否有任何事件 最好的, 巴拉。当我们在FlowDocumentPageViewer中更改页面时,是否有任何事件? 对。无论何时更改页面,FlowDocumentPageViewer.MasterPage都会更改值。因为它是一个DP,所以您可以将自己的DP绑定到它,并在DP上处理PropertyChangedCallback 在FlowDocume
巴拉。当我们在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}}"
...
当我们在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}}"
...
对于母版页,您可以在FlowDocumentPageViewer控件模板的DocumentPageView中处理PageDisconnected事件。母版页更改时将引发此事件。在事件处理程序中,您可以将DocumentPageView.PageNumber与存储的页码值进行比较。对于母版页,您可以在FlowDocumentPageViewer控件模板中的DocumentPageView中处理PageDisconnected事件。母版页更改时将引发此事件。在事件处理程序中,您可以将DocumentPageView.PageNumber与存储的页码值进行比较