GdPicture.NET Reference Guide
PreviewBeforeAnnotationAddedByUser Event





GdPicture14.WPF Namespace > GdViewer Class : PreviewBeforeAnnotationAddedByUser Event
This event is raised right before a new GdPicture/XMP annotation is to be added by a user. This event occurs in the mouse down action, therefore it allows you to change some properties of the newly added annotation before rendering it on the screen.

The event makes use of tunel routing strategy. Please check the corresponded GdViewer.BeforeAnnotationAddedByUserEventArgs for given parameters.

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

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

PropertyDescription
The 0-based index of the newly added annotation within the current page of the displayed document. It is a value from 0 to GetAnnotationCount-1.  
(Inherited from System.Windows.RoutedEventArgs)
(Inherited from System.Windows.RoutedEventArgs)
(Inherited from System.Windows.RoutedEventArgs)
(Inherited from System.Windows.RoutedEventArgs)
Remarks
Be aware, that this event only handles GdPicture/XMP annotations.
Example
Please follow the example for the BeforeAnnotationAddedByUser event to motivate yourself on how to utilize this event in your GdViewer control.
See Also