GdPicture.NET Reference Guide
BeforeDocumentChange Event (GdViewer)
Example 





GdPicture14.WPF Namespace > GdViewer Class : BeforeDocumentChange Event
This event is raised right before the new document is displayed (changed) after the successful loading in the GdViewer control using one of the DisplayFrom... methods.

The event makes use of bubble routing strategy. Please check the corresponded GdViewer.BeforeDocumentChangeEventArgs for more details.

Syntax
'Declaration
 
Public Event BeforeDocumentChange As GdViewer.BeforeDocumentChangeHandler
public event GdViewer.BeforeDocumentChangeHandler BeforeDocumentChange
public event BeforeDocumentChange: GdViewer.BeforeDocumentChangeHandler; 
In JScript, you can handle the events defined by another class, but you cannot define your own.
public: __event GdViewer.BeforeDocumentChangeHandler* BeforeDocumentChange
public:
event GdViewer.BeforeDocumentChangeHandler^ BeforeDocumentChange
Event Data

The event handler receives an argument of type GdViewer.BeforeDocumentChangeEventArgs containing data related to this event. The following GdViewer.BeforeDocumentChangeEventArgs properties provide information specific to this event.

PropertyDescription
(Inherited from System.Windows.RoutedEventArgs)
(Inherited from System.Windows.RoutedEventArgs)
(Inherited from System.Windows.RoutedEventArgs)
(Inherited from System.Windows.RoutedEventArgs)
Example
How to utilize this event in your GdViewer control.
'We assume that the GdViewer1 control has been properly integrated
'and the BeforeDocumentChange event has been properly added.
 
'Define the event.
Sub GdViewer1_BeforeDocumentChange(ByVal sender As Object, ByVal e As GdPicture14.WPF.GdViewer.BeforeDocumentChangeEventArgs)
    'Do your stuff here.
End Sub
//We assume that the GdViewer1 control has been properly integrated
//and the BeforeDocumentChange event has been properly added.
 
//Define the event.
void GdViewer1_BeforeDocumentChange(object sender, GdPicture14.WPF.GdViewer.BeforeDocumentChangeEventArgs e)
{
    //Do your stuff here.
}
See Also