1

助けが必要でした。

  1. FlowDocumentPageViewer でページを変更しているときに何かイベントはありますか
  2. FlowDocumentPageViewer で zoomIn/zoomOut を実行しているときに何かイベントがありますか

最高、バラ。

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}}"
  ...

MyZoomおよびは、 MyControlMyMasterPageで定義された DependencyProperties です。

于 2009-11-19T08:53:01.770 に答える
0

マスター ページの場合、FlowDocumentPageViewer コントロール テンプレートの DocumentPageView 内で PageDisconnected イベントを処理できます。このイベントは、マスター ページが変更されたときに発生します。イベント ハンドラー内で、DocumentPageView.PageNumber を保存されているページ番号の値と比較できます。

于 2011-10-04T09:27:35.023 に答える