Annot ann = sender as Annot; Annot.Type type = ann.GetType(); Console.WriteLine("Annotation " + which + ": type: " + type + " on page:" + e.PageNumber);
The PDFNetiOSXamarinSample shows an example implementation of this.
Annot ann = sender as Annot;
Annot.Type type = ann.GetType();
Console.WriteLine("Annotation " + which + ": type: " + type + " on page:" + e.PageNumber);
The PDFNetiOSXamarinSample shows an example implementation of this.
For anyone searching for the solution: this is the answer:
I was trying to set a unique ID on the annotation within Xamarin/IOS.
The _toolManager_AnnotationAdded event returned a PTAnnot object, on which I could not run a function in C#. I had to convert it to Annot object using the TypeConvertHelper.
var annotation = TypeConvertHelper.ConvAnnotToManaged(e.Annotation);
After this I could use its functions:
annotation.SetUniqueID(Guid.NewGuid().ToString());