.NET Framework Class Library
DocumentViewer.PageCountChanged Event
<< Click to Display Table of Contents >> Navigation: Gnostice Document Studio .NET > Reference Documentation > API Reference > Gnostice.Controls.WPF Namespace > DocumentViewer Class > DocumentViewer Events > DocumentViewer.PageCountChanged Event |
Occurs when the viewer is processing pages of the document so the page count will be updated progressively.
Namespace: Gnostice.Controls.WPF
Assembly: Gnostice.Controls.WPF (in Gnostice.Controls.WPF.dll)
Visual Basic |
Public Event PageCountChanged As EventHandler(Of PageCountChangedEventArgs) |
C# |
public event EventHandler<PageCountChangedEventArgs> PageCountChanged |
Visual C++ |
public: |
Some formats such as PDF require documents to explicitly specify the total number of pages in the document. Some others such as DOCX do not. Even as the viewer displays the first few pages of a document, it may be (in the background) still constructing the layout of the remaining pages. During this time, the [!:Gnostice.Controls.WinForms.DocumentViewer.PageCount] property will represent the last page that has been constructed in the background, not the total number of pages in the document. When processing documents such as DOCX, handle this event to get notified when the total number of pages is known. Only then, the PageCount property becomes accurate.