New to Telerik Document ProcessingStart a free 30-day trial

Links

Updated on Jun 3, 2026

The Link class inherits the abstract Annotation class. Link annotations represent either a hypertext link to a destination elsewhere in the document or an action to be performed. The Link class has two separate constructors—one that requires a Destination object and one that requires an Action object.

Link exposes the following properties:

PropertyDescription
DestinationA destination to display when the annotation is activated. See Example 1.
NamedDestinationA named destination associated with the link.
ActionAn action to perform when the annotation is activated. See Example 2.

Example 1: Add link to destination

C#
RadFixedDocument document = new RadFixedDocument();
RadFixedPage page = new RadFixedPage();
document.Pages.Add(page);
Location destination = new Location
{
    Left = 225,
    Top = 500,
    Zoom = 1
};
Link linkWithDestination = new Link(destination);
page.Annotations.Add(linkWithDestination);

Example 2: Add link with action

C#
GoToAction action = new GoToAction
{
    Destination = destination
};
Link linkWithAction = new Link(action);
page.Annotations.Add(linkWithAction);

In Example 2, the action object must be from the Telerik.Windows.Documents.Fixed.Model.Actions.Action type.

Destination

The abstract Destination class defines a particular view of a document, consisting of the following items:

  • The page to display.
  • The location on that page.
  • The magnification (zoom) factor to use when displaying the page.

The Destination class itself only exposes a Page property specifying the page of the destination. The other properties of the view are determined by the classes that inherit Destination:

ClassDescription
LocationExposes Left, Top, and Zoom properties. Displays the specified page positioned with (Left, Top) at the upper-left corner of the window, magnified by Zoom.
PageFitDisplays the specified page magnified just enough to fit the entire page within the window both horizontally and vertically.
PageHorizontalFitExposes Top property. Displays the specified page with Top positioned at the top edge of the window, magnified to fit the entire page width.
PageVerticalFitExposes Left property. Displays the specified page with Left at the left edge of the window, magnified to fit the entire page height.
RectangleFitExposes Left, Top, Right, and Bottom properties. Displays the specified page magnified to fit the rectangle defined by those coordinates.
BoundingRectangleFitDisplays the specified page magnified to fit its bounding box within the window.
BoundingRectangleHorizontalFitExposes Top property. Displays the specified page with Top at the top edge, magnified to fit the entire width of its bounding box.
BoundingRectangleVerticalFitExposes Left property. Displays the specified page with Left at the left edge, magnified to fit the entire height of its bounding box.

Example 3 shows how to create a Location object, associate it with a Link, and add it to a RadFixedPage.

Example 3: Add link with location

C#


RadFixedPage secondPage = new RadFixedPage();
document.Pages.Add(secondPage);
Location location = new Location();
location.Left = 225;
location.Top = 500;
location.Zoom = 4;
location.Page = secondPage;
RadFixedPage firstPage = document.Pages.AddPage();
var link = firstPage.Annotations.AddLink(location);
link.Rect = new Rect(10, 10, 50, 50);

Action

Example 4 demonstrates how to create an action of type GoToAction, associate it with a Link, and add it to a RadFixedPage. The location object can be of type Location like the one in Example 3.

Example 4: Add link with action

C#
GoToAction goToAction = new GoToAction();
goToAction.Destination = location;

var goToLink = firstPage.Annotations.AddLink(goToAction);
goToLink.Rect = new Rect(10, 10, 50, 50);

UriAction uriAction = new UriAction();
uriAction.Uri = new Uri(@"http://www.telerik.com");

var uriLink = firstPage.Annotations.AddLink(uriAction);
uriLink.Rect = new Rect(70, 10, 50, 50);

See Also

In this article
DestinationActionSee Also
Not finding the help you need?
Contact Support