Adds an anchor (C1Anchor or C1AnchorText) at the current position in the document.
Can be used only if IsStartEndDocMode is true.
Namespace:
C1.C1PreviewAssembly: C1.C1Report.2 (in C1.C1Report.2.dll)
Syntax
C# |
---|
public void AddAnchor( string name, string description, Object userData ) |
Visual Basic |
---|
Public Sub AddAnchor ( _ name As String, _ description As String, _ userData As Object _ ) |
Parameters
- name
- Type: System..::..String
A string assigned to the Name of the anchor.
- description
- Type: System..::..String
A string assigned to the Description of the anchor.
- userData
- Type: System..::..Object
Arbitrary data assigned to the UserData of the anchor.
Remarks
This method can only be used if the current document is being created using the StartDoc()()()()/EndDoc()()()() methods (i.e. if IsStartEndDocMode is true).
The type of anchor that this method creates depends on the current state of the document:- If an inline paragraph has been started (e.g. with a call to RenderInline(ParagraphObject, Object, Object, Style) or RenderInlineBegin(Object, Object, Style, Boolean)) and has not been ended (e.g. with a call to RenderInlineEnd()()()(), or any of the RenderBlock() or RenderDirect() methods), this method creates a C1AnchorText on the current paragraph.
- Otherwise (if there's no current inline paragraph), this method creates a C1Anchor at the current point in the block flow.