Change the Selection color of the annotations

7 Dec 20231 minute to read

PDF Viewer allows you to change the selection color of both the locked and unlocked annotations with the SelectorSettings property of the PdfViewerControl and PdfDocumentView classes. The following code sample illustrates the same.

// Change the selected stroke color of an unlocked annotation.
pdfViewer.SelectorSettings.StrokeColor = Color.FromArgb(255,255,0,0);
// Change the selected stroke color of a locked annotation.
pdfViewer.SelectorSettings.LockedStrokeColor = Color.FromArgb(255, 0, 255, 0);
' Change the selected stroke color of an unlocked annotation.
pdfViewer.SelectorSettings.StrokeColor = Color.FromArgb(255, 255, 0, 0)
' Change the selected stroke color of a locked annotation.
pdfViewer.SelectorSettings.LockedStrokeColor = Color.FromArgb(255, 0, 255, 0)