With the example you provided, it looks more like you are attempting to rotate the Layer. Layers.Count is most likely returning 1 because there is only one layer. If you are trying to get the number of annotations on one layer, you will need to look at WebAnnotationViewer1.Annotations.Layers[i].Items.Count. To access individual annotation methods and properties, you will need to cast each item in the Items collection to the specific type of annotation you are looking for. Something like this:
// untested code
AnnotationUI ann = WebAnnotationViewer1.Annotations.Layers[i].Items[j];
EllipseAnnotation ellipse = ann as EllipseAnnotation;
if (ellipse != null)
{
...
}
RectangleAnnotation rectangle = ann as RectangleAnnotation;
if (rectangle != null)
{
...
}
etc...
David Cilley
My AJAX Imaging BlogAtalasoft Development Team