[]
Occurs after the document has been fully loaded and rendered in the viewer.
public event LoadCompletedEventHandler LoadCompleted
Type | Description |
---|---|
LoadCompletedEventHandler | Occurs after the document has been fully loaded and rendered in the viewer. |
The EventArgs may provide additional details about the load operation. This event can be used to perform actions that should only occur after the entire document is available for viewing, such as enabling document navigation controls.
public partial class MyForm : Form
{
private Viewer viewer;
public MyForm()
{
InitializeComponent();
// Initialize the viewer
viewer = new Viewer();
this.Controls.Add(viewer);
// Subscribe to the LoadCompleted event
viewer.LoadCompleted += Viewer_LoadCompleted;
}
private void Viewer_LoadCompleted(object sender, EventArgs e)
{
// Handle the LoadCompleted event
// For example, update the status bar with the total number of pages
statusBarLabel.Text = $"Total Pages: {viewer.Document.Pages.Count}";
}
}