New to Telerik Document ProcessingStart a free 30-day trial

Registry of named destinations used as navigation targets across the document for links and actions.

Definition

Namespace:Telerik.Windows.Documents.Fixed.Model.Collections

Assembly:Telerik.Windows.Documents.Fixed.dll

Syntax:

C#
public sealed class NamedDestinationsCollection : IEnumerable<NamedDestination>, IEnumerable

Inheritance: objectNamedDestinationsCollection

Implements: IEnumerableIEnumerable<NamedDestination>

Constructors

Create a named-destinations registry so links and actions can target pages or views by name.

C#
public NamedDestinationsCollection(IDestinationContainer parent)
Parameters:parentIDestinationContainer

The parent.

Methods

Add a new named destination with the specified name and destination target.

C#
public NamedDestination Add(string name, Destination destination)
Parameters:namestring

The unique name to assign to the named destination.

destinationDestination

The destination target that defines where to navigate when this named destination is used.

Returns:

NamedDestination

The newly created named destination instance.

Exceptions:

ArgumentNullException

Thrown when the name or destination parameter is null.

ArgumentException

Thrown when an element with the same name already exists in the collection.

Add a new named destination with the specified name and go-to action.

C#
public NamedDestination Add(string name, GoToAction goToAction)
Parameters:namestring

The unique name to assign to the named destination.

goToActionGoToAction

The go-to action that defines the navigation behavior for this named destination.

Returns:

NamedDestination

The newly created named destination instance.

Exceptions:

ArgumentNullException

Thrown when the name or goToAction parameter is null.

ArgumentException

Thrown when an element with the same name already exists in the collection.

Remove all named destinations from the collection.

C#
public void Clear()

Determine whether a named destination with the specified name exists.

C#
public bool ContainsName(string name)
Parameters:namestring

The name to search for in the collection.

Returns:

bool

True if a named destination with the specified name exists; otherwise, false.

Exceptions:

ArgumentNullException

Thrown when the name parameter is null.

Return an enumerator that iterates through the collection of named destinations.

C#
public IEnumerator<NamedDestination> GetEnumerator()
Returns:

IEnumerator<NamedDestination>

An enumerator for the collection.

Implements: IEnumerable<NamedDestination>.GetEnumerator()

Remove the named destination with the specified name and clean up its parent associations.

C#
public bool Remove(string name)
Parameters:namestring

The name of the named destination to remove.

Returns:

bool

True if the named destination was successfully found and removed; otherwise, false.

Exceptions:

ArgumentException

Thrown when the name parameter is null.

Change the name of an existing named destination in the collection.

C#
public void Rename(string oldName, string newName)
Parameters:oldNamestring

The current name of the named destination to rename.

newNamestring

The new name to assign to the named destination.

Try to retrieve the named destination associated with the specified name.

C#
public bool TryGetValue(string name, out NamedDestination value)
Parameters:namestring

The name of the destination to retrieve.

valueNamedDestination

When this method returns, contains the named destination associated with the specified name if found; otherwise, null.

Returns:

bool

True if a named destination with the specified name was found; otherwise, false.

Exceptions:

ArgumentException

Thrown when the name parameter is null.

Properties

Number of named destinations contained in the collection.

C#
public int Count { get; }

Collection of all destination names in this collection.

C#
public IEnumerable<string> Names { get; }

Get the named destination associated with the specified name.

C#
public NamedDestination this[string name] { get; }
Parameters:namestring

The name of the named destination to retrieve.

Property Value:

The named destination with the specified name.

Exceptions:

KeyNotFoundException

Thrown when no named destination with the specified name exists in the collection.