Class AnnotationCollection
Represents a collection of annotations on a PDF page, providing methods to add various types of annotations.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.Fixed.Model.Collections
Assembly: Telerik.Windows.Documents.Fixed.dll
Syntax
public sealed class AnnotationCollection : DocumentElementCollection<Annotation, RadFixedPage>, IList<Annotation>, ICollection<Annotation>, IEnumerable<Annotation>, IEnumerable
Constructors
AnnotationCollection(RadFixedPage)
Initializes a new instance of the AnnotationCollection class.
Declaration
public AnnotationCollection(RadFixedPage parent)
Parameters
|
RadFixedPage
parent
The parent. |
Methods
AddHighlight(Rect)
Creates and adds a highlight annotation to mark text or content with a highlighted background.
Declaration
public TextMarkupAnnotation AddHighlight(Rect rect)
Parameters
|
System.Windows.Rect
rect
The rectangle defining the area to highlight in page coordinates. |
Returns
|
TextMarkupAnnotation
The created highlight annotation. |
AddLine(Point, Point)
Creates and adds a line annotation that draws a straight line between two points.
Declaration
public LineAnnotation AddLine(Point start, Point end)
Parameters
|
System.Windows.Point
start
The starting point of the line in page coordinates. |
|
System.Windows.Point
end
The ending point of the line in page coordinates. |
Returns
|
LineAnnotation
The created line annotation. |
AddLink(Action)
Creates and adds a hyperlink annotation that executes a specified action when clicked.
Declaration
public Link AddLink(Action action)
Parameters
|
Action
action
The action to execute when the link is clicked. |
Returns
|
Link
The newly created link annotation. |
AddLink(Destination)
AddLink(NamedDestination)
AddPopup(MarkupAnnotation)
Creates and adds a popup annotation that displays additional content for a parent markup annotation.
Declaration
public PopupAnnotation AddPopup(MarkupAnnotation parent)
Parameters
|
MarkupAnnotation
parent
The parent markup annotation that this popup will be associated with. |
Returns
|
PopupAnnotation
The created popup annotation. |
AddSquiggly(Rect)
Creates and adds a squiggly underline annotation to mark text with a wavy underline effect.
Declaration
public TextMarkupAnnotation AddSquiggly(Rect rect)
Parameters
|
System.Windows.Rect
rect
The rectangle defining the bounds of the squiggly underline in page coordinates. |
Returns
|
TextMarkupAnnotation
The newly created squiggly underline annotation. |
AddStamp(Rect)
Creates and adds a stamp annotation that displays a rubber stamp-like image or text.
Declaration
public StampAnnotation AddStamp(Rect rect)
Parameters
|
System.Windows.Rect
rect
The rectangle defining the area for the stamp in page coordinates. |
Returns
|
StampAnnotation
The created stamp annotation. |
AddStrikeout(Rect)
Creates and adds a strikeout annotation to mark text with a line through it.
Declaration
public TextMarkupAnnotation AddStrikeout(Rect rect)
Parameters
|
System.Windows.Rect
rect
The rectangle defining the area to strike out in page coordinates. |
Returns
|
TextMarkupAnnotation
The created strikeout annotation. |
AddText(Rect)
Creates and adds a text annotation that displays a pop-up note when clicked.
Declaration
public TextAnnotation AddText(Rect rect)
Parameters
|
System.Windows.Rect
rect
The rectangle defining the clickable area for the text annotation in page coordinates. |
Returns
|
TextAnnotation
The created text annotation. |
AddUnderline(Rect)
Creates and adds an underline annotation to mark text with a straight underline.
Declaration
public TextMarkupAnnotation AddUnderline(Rect rect)
Parameters
|
System.Windows.Rect
rect
The rectangle defining the area to underline in page coordinates. |
Returns
|
TextMarkupAnnotation
The created underline annotation. |
OnAfterAdd(Annotation)
Executes the action after the item is added to the collection.
Declaration
protected override void OnAfterAdd(Annotation item)
Parameters
|
Annotation
item
The annotation that has been added to the collection. |
Overrides
OnAfterRemove(Annotation)
Executes the action after the item is removed from the collection.
Declaration
protected override void OnAfterRemove(Annotation item)
Parameters
|
Annotation
item
The annotation that has been removed from the collection. |