'We assume that the GdViewer1 control has been properly integrated
'and the AnnotationStartEditingText event has been properly added.
'Define the event.
Sub GdViewer1_AnnotationStartEditingText(object sender, GdPicture14.WPF.GdViewer.AnnotationStartEditingTextEventArgs e)
Dim annot As GdPicture14.Annotations.Annotation = GdViewer1.GetAnnotationFromIdx(e.AnnotationIdx)
Dim text As String = ""
If TypeOf annot Is GdPicture14.Annotations.AnnotationStickyNote Then
text = (CType(annot, GdPicture14.Annotations.AnnotationStickyNote)).Text
ElseIf TypeOf annot Is GdPicture14.Annotations.AnnotationText Then
text = (CType(annot, GdPicture14.Annotations.AnnotationText)).Text
End If
'Hiding the editable dialogue box without allowing users to change the original text.
HideTextEditBox(false)
MessageBox.Show(text, "GdViewer.HideTextEditBox")
End Sub
//We assume that the GdViewer1 control has been properly integrated
//and the AnnotationStartEditingText event has been properly added.
//Define the event.
void GdViewer1_AnnotationStartEditingText(object sender, GdPicture14.WPF.GdViewer.AnnotationStartEditingTextEventArgs e)
{
GdPicture14.Annotations.Annotation annot = GdViewer1.GetAnnotationFromIdx(e.AnnotationIdx);
string text = "";
if (annot is GdPicture14.Annotations.AnnotationStickyNote)
text = ((GdPicture14.Annotations.AnnotationStickyNote)annot).Text;
else if (annot is GdPicture14.Annotations.AnnotationText)
text = ((GdPicture14.Annotations.AnnotationText)annot).Text;
//Hiding the editable dialogue box without allowing users to change the original text.
HideTextEditBox(false);
}