Hi,
I am using an web annotation viewer to display the documents and in that I would want to create Annotations like Text Annotation, Rectangle and other annotations. When I create a Text Annotation, I am able to edit the text. But since I wanted to create a custom annotation which when created will display a Shadow to the text, I created my own custom annotation called StickyNote and inherited this from Text Data and registered this annotation, with the AnnotationRenderes. Now when I try to create this StickyNote annotaion, it works fine and the shadow gets displayed propely, but I am not able to edit the annotation. Please let me know why i am not able to edit it.
This is Code I have used to create the StickyNote class and also the CreateAnnotations function
public class StickyNote : TextData
{
public StickyNote()
:
base()
{
}
public StickyNote(SerializationInfo info, StreamingContext context)
:
base(info, context)
{
}
}
public void WebAnnotationViewer_AnnotationCreated(object sender, AnnotationCreatedEventArgs e)
{
StickyNote sticky = e.AnnotationData as StickyNote;
if (sticky != null)
{
sticky.Size =
new SizeF(200, 200);
sticky.Shadow =
new Atalasoft.Annotate.AnnotationBrush(Color.FromArgb(120, Color.Gray));
sticky.ShadowOffset =
new PointF(25, 25);
sticky.Fill =
new AnnotationBrush(Color.FromArgb(128, Color.Yellow));
sticky.Font =
new AnnotationFont("Arial", 18f);
sticky.ToolTip =
"Right-click to edit";
}
}
Please let me know if I am missing something.
Thanks
Ganesh