PrintDocument for WinForms | ComponentOne
C1.Win.PrintPreview.4.8 Assembly / C1.Win.C1Preview.Design Namespace / SampleC1PrintDocument Class / AddAnchor Method / AddAnchor(String,String,Object) Method
A string assigned to the C1.C1Preview.C1Anchor.Name of the anchor.
A string assigned to the C1.C1Preview.C1Anchor.Description of the anchor.
Arbitrary data assigned to the C1.C1Preview.C1Anchor.UserData of the anchor.

In This Topic
    AddAnchor(String,String,Object) Method
    In This Topic
    Adds an anchor (C1.C1Preview.C1Anchor or C1.C1Preview.C1AnchorText) at the current position in the document. Can be used only if C1.C1Preview.C1PrintDocument.IsStartEndDocMode is true.
    Syntax
    'Declaration
     
    Public Overloads Sub AddAnchor( _
       ByVal name As String, _
       ByVal description As String, _
       ByVal userData As Object _
    ) 
    public void AddAnchor( 
       string name,
       string description,
       object userData
    )

    Parameters

    name
    A string assigned to the C1.C1Preview.C1Anchor.Name of the anchor.
    description
    A string assigned to the C1.C1Preview.C1Anchor.Description of the anchor.
    userData
    Arbitrary data assigned to the C1.C1Preview.C1Anchor.UserData of the anchor.
    Remarks

    This method can only be used if the current document is being created using the C1.C1Preview.C1PrintDocument.StartDoc%M:C1.C1Preview.C1PrintDocument.EndDoc% methods (i.e. if C1.C1Preview.C1PrintDocument.IsStartEndDocMode is true).

    The type of anchor that this method creates depends on the current state of the document:
    See Also