Search code examples
wpfflowdocumentreader

How can I go specific page on FlowDocumentReader?


How can I go specific page on FlowDocumentReader? Of course, i'm using pages mode on FlowDocumentReader.

I heard that FlowDocumentPageViewer has GoToPage( ) method. so it is easier to use FlowDocumentPageViewer instead of FlowDocumentReader.

However, I hope to use Page Mode & Scroll Mode. I hope to use GoToPage function at only Page Mode on FlowDocumentReader.

Can I get the solution - How can I go specific page on FlowDocumentReader? ( or I want to know how can I get FlowDocumentPageViewer from FlowDocumentReader. I think FlowDocumentReader has 3 modes ( like FlowDocumentPageViewer, scrollviewer...). So may it possible to convert.

Can I know the ways?


Solution

  • The both of things which you want is impossible. However, you can create a new class by extending from FlowDocumentReader.

    You can see the source code of FlowDocumentReader - https://referencesource.microsoft.com/#PresentationFramework/src/Framework/System/Windows/Controls/FlowDocumentReader.cs,ccac5a02d450af41.

    So, try to create what you want.