GdPicture.NET.14
GdPicture14.WPF Namespace / GdViewer Class / AnnotationResized Event
Example





In This Topic
AnnotationResized Event (GdViewer)
In This Topic
This event is raised right after a GdPicture/XMP annotation has been resized by a user.

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

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

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

PropertyDescription
The 0-based index of the resized 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
How to utilize this event in your GdViewer control.
'We assume that the GdViewer1 control has been properly integrated
'and the AnnotationResized event has been properly added.
            
'Define the event.
Sub GdViewer1_AnnotationResized(ByVal sender As Object, ByVal e As GdPicture14.WPF.GdViewer.AnnotationResizedEventArgs)
    Dim annot As GdPicture14.Annotations.Annotation = GdViewer1.GetAnnotationFromIdx(e.AnnotationIdx)
    MessageBox.Show("The annotation with the index " + e.AnnotationIdx.ToString() + " has been resized.", "GdViewer.AnnotationResized")
End Sub
//We assume that the GdViewer1 control has been properly integrated
//and the AnnotationResized event has been properly added.
            
//Define the event.
void GdViewer1_AnnotationResized(object sender, GdPicture14.WPF.GdViewer.AnnotationResizedEventArgs e)
{
    GdPicture14.Annotations.Annotation annot = GdViewer1.GetAnnotationFromIdx(e.AnnotationIdx);
    MessageBox.Show("The annotation with the index " + e.AnnotationIdx.ToString() + " has been resized.", "GdViewer.AnnotationResized");
}
See Also