Hi
I think I might have found a bug in the AnnotationViewer which results in a failure to fire the AnnotationResized() event. I've been using the AnnotationConfinement property to contain annotations within the bounds of an image in the viewer. However I discovered an issue relating to the firing of the AnnotationResized() event. To replicate the issue you need to place an AnnotationViewer control on a form, run the program, and then throw in some annotations (I've used the rectangle annotation but the problem may equally apply to others). Save the annotations out, and then reload them into the viewer.
Once the annotations are reloaded, breakpoint the AnnotationResized() event, select an annotation and resize it slightly (still within the bounds of the document). You will notice that the AnnotationResized() event fires as expected. However if you resize an annotation right up to the edge of the document area or beyond it, the AnnotationResized() event doesn't fire although the annotation resizes so it is flush with the edge of the document area! I've done a fair bit of testing with this and established that annotations will fire the event provided that they are 1 pixel or more from the edge of the image bounds in all 4 dimensions (top, bottom, left and right). If they are resized to be flush with the edge of the image, or an attempt is made to resize them beyond the confines of the image area, the event doesn't fire despite the annotation changing size. When the confinement is switched off, the event fires irrespective of the position of the annotation.
However if you move an annotation into the top-left corner of the image, obviously you cannot resize left or up. Despite the annotation being over the 1 pixel line I spoke of earlier, resizing to the right or downwards DOES fire the event.
Could you have a go at replicating this and establish whether or not it is indeed a bug?
Many thanks in advance.