GdPicture.NET.14
GdPicture14 Namespace / GdViewer Class / AnnotationRotated Event
Example





AnnotationRotated Event (GdViewer)
This event is raised right after a GdPicture/XMP annotation has been rotated by a user.

Please check the corresponded GdViewer.AnnotationRotatedEventHandler for given parameters.

Syntax
'Declaration
 
Public Event AnnotationRotated As GdViewer.AnnotationRotatedEventHandler
 
Remarks
Be aware, that this event only handles GdPicture/XMP annotations.
Example
How to add this event to your GdViewer control. This example shows you how to address the currently rotated annotation to find out the rotation angle.
'We assume that the GdViewer1 control has been properly integrated.
Friend WithEvents GdViewer1 As GdPicture14.GdViewer
            
'Add the event.
AddHandler GdViewer1.AnnotationRotated, AddressOf GdViewer1_AnnotationRotated
            
'Define the event.
Sub GdViewer1_AnnotationRotated(ByVal AnnotationIdx As Integer) Handles GdViewer1.AnnotationRotated
    Dim annot As GdPicture14.Annotations.Annotation = GdViewer1.GetAnnotationFromIdx(AnnotationIdx)
    MessageBox.Show("The annotation with the index " + AnnotationIdx.ToString() + " has been rotated by " + annot.Rotation + " degrees.", "GdViewer.AnnotationRotated")
End Sub
See Also