How can I change the default color for a new annotation in PDFViewCtrl?

Q: how can i change the color in PDFViewCtrl’s-ToolMode. If i create a
new Annotation (Line, PolyLine) the annotation’s color is always red.
I would like to set the “pen” color programatically before i start to
create the annot.


A: You can set the default color for different annotation types as
follows:

_pdfview.GetDefaultAnnotation(“Arrow”).SetColor(new ColorPt(0, 0, 1));
_pdfview.GetDefaultAnnotation(“Line”).SetColor(new ColorPt(0, 0, 1));
_pdfview.GetDefaultAnnotation(“Circle”).SetColor(new ColorPt(0, 0,
1));
_pdfview.GetDefaultAnnotation(“Square”).SetColor(new ColorPt(0, 0,
1));
_pdfview.GetDefaultAnnotation(“PolyLine”).SetColor(new ColorPt(0, 0,
1));
_pdfview.GetDefaultAnnotation(“Polygon”).SetColor(new ColorPt(0, 0,
1));
_pdfview.GetDefaultAnnotation(“Text”).SetColor(new ColorPt(0, 0, 1));
_pdfview.GetDefaultAnnotation(“FreeText”).SetColor(new ColorPt(0, 0,
1));