Diagram / Diagram DOM / Drawings / Shapes / Shape Elements / Shape Hyperlink
In This Topic
    Shape Hyperlink
    In This Topic

    Shape hyperlinks has been implemented in NOV Diagram. A shape hyperlink can point to any of the following:

    When a shape hyperlink is assigned to a shape, NOV Diagram shows a hand cursor when the mouse is over that shape and navigates to the hyperlink target when the user Ctrl + Clicks (Cmd + Clicks on Mac) the shape.

     Creating Hyperlinks Programmatically

    To set a shape hyperlink to a shape, create and instance of the NShapeHyperlink class and assign it to the Hyperlink property of the shape. For example, the following line of code creates and assigns a shape hyperlink to the second page of a drawing. When the user Ctrl + Clicks (Cmd + Clicks on Mac) the shape, NOV Diagram will navigate to the second page of the drawing.

    Create a shape hyperlink
    Copy Code
    shape.Hyperlink = new NShapeHyperlink(drawingView.Content.Pages[1]);
    

    For page and shape hyperlinks, you can also set the Zoom percent you want the page to open at by setting the desired value to the ZoomPercent property of the shape hyperlink. It is by default set to 100.

    To override the default tooltip (mouse over text) of the shape when it has a shape hyperlink, set the Description property of the shape hyperlink to the desired tooltip text. The following image demonstrates the default tooltip of a shape hyperlink to a page:

    To remove a shape hyperlink of a shape, just set the Hyperlink property of the shape to null.

     Creating Hyperlinks through the UI

    To create a shape hyperlink through NOV Diagram's UI, right-click a shape and select Insert Shape Hyperlink... from the context menu. Alternatively, left-click a shape to select it, open the Insert ribbon tab and click Shape Hyperlink. The Shape Hyperlink dialog will open. In it you can specify the type of the shape hyperlink and configure its parameters. When ready click OK to create and assign the hyperlink to the shape.

    The following image shows the Insert/Edit Shape Hyperlink dialog of a shape hyperlink to a page:

    To edit a shape hyperlink, right-click a shape with a hyperlink and select Edit Shape Hyperlink... from the context menu. Change the shape hyperlink properties you want in the dialog that opens and click OK to apply the changes or Cancel to discard them.

    To remove a shape hyperlink, right-click a shape with a hyperlink and select Remove Shape Hyperlink... from the context menu.