Bewerken

Share via


PackagingProgressEventArgs(PackagingAction, Int32) Constructor

Definition

Initializes a new instance of the PackagingProgressEventArgs class.

public:
 PackagingProgressEventArgs(System::Windows::Xps::Packaging::PackagingAction action, int numberCompleted);
public PackagingProgressEventArgs (System.Windows.Xps.Packaging.PackagingAction action, int numberCompleted);
new System.Windows.Xps.Packaging.PackagingProgressEventArgs : System.Windows.Xps.Packaging.PackagingAction * int -> System.Windows.Xps.Packaging.PackagingProgressEventArgs
Public Sub New (action As PackagingAction, numberCompleted As Integer)

Parameters

action
PackagingAction

The action that the packaging process is currently performing.

numberCompleted
Int32

The number of simultaneous times that the specified action occurred.

Remarks

In certain situations and for specific types, multiple packaging progress events occur at the same time. These logically distinct, but temporally identical, events are combined into a single PackagingProgressEvent and numberCompleted is more than 1. For example, when you print, font subsetting is performed every four pages. Each page must be cached until the subsetting is complete, and then all four FixedPageCompleted events occur at the same time. The constructor for the resulting PackagingProgressEventArgs sets action to FixedPageCompleted and sets numberCompleted to 4.

For example, if a package consists of a single four-page document that uses one font and no images or other resources, the sequence of events might occur as shown in the following table.

The sequence of events for a simple package

AddingDocumentSequence
1

AddingFixedDocument
1

AddingFixedPage
1

AddingFixedPage
1

AddingFixedPage
1

AddingFixedPage
1

FontAdded
1

FixedPageCompleted
4

FixedDocumentCompleted
1

DocumentSequenceCompleted
1

XpsDocumentCommitted
1

Applies to