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

.NET Framework Class Library

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)

Syntax

Visual Basic

Public Event PageCountChanged As EventHandler(Of PageCountChangedEventArgs)

C#

public event EventHandler<PageCountChangedEventArgsPageCountChanged

Visual C++

public:
 event EventHandler<PageCountChangedEventArgs^>^ PageCountChanged {
 void add (EventHandler<PageCountChangedEventArgs^>^ value);
 void remove (EventHandler<PageCountChangedEventArgs^>^ value);
}

Remarks

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.

See Also

DocumentViewer Class

DocumentViewer Members

Gnostice.Controls.WPF Namespace