There is no event that is fired when a new page is added to the document. The only thing that comes to mind is to use the DocumentContentChanged event which is fired asynchronously on every change in the content of the document. Then, in the handler count the number of pages and compare it to the previous value, something in the lines of:
previousPageNumber = 1;
sender, EventArgs e)
pageNumber = 0;
pageNumber += section.GetAssociatedLayoutBoxes().Count();
(pageNumber != previousPageNumber)
Debug.WriteLine(pageNumber - previousPageNumber +
" pages added"
previousPageNumber = pageNumber;
Note that this event will be fired even when you add the image (as it is a change in the document). Thus, it is not recommended to invoke actions that can cause a cycle (in this case actions that change the page number, floating images should be OK).
I hope this answers your question.
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>