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:
public sealed class NamedDestinationsCollection : IEnumerable<NamedDestination>, IEnumerable
Inheritance: objectNamedDestinationsCollection
Implements:
Constructors
Create a named-destinations registry so links and actions can target pages or views by name.
public NamedDestinationsCollection(IDestinationContainer parent)
The parent.
Methods
Add a new named destination with the specified name and destination target.
public NamedDestination Add(string name, Destination destination)
The unique name to assign to the named destination.
destinationDestinationThe destination target that defines where to navigate when this named destination is used.
Returns:The newly created named destination instance.
Exceptions:Thrown when the name or destination parameter is null.
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.
public NamedDestination Add(string name, GoToAction goToAction)
The unique name to assign to the named destination.
goToActionGoToActionThe go-to action that defines the navigation behavior for this named destination.
Returns:The newly created named destination instance.
Exceptions:Thrown when the name or goToAction parameter is null.
Thrown when an element with the same name already exists in the collection.
Remove all named destinations from the collection.
public void Clear()
Determine whether a named destination with the specified name exists.
public bool ContainsName(string name)
The name to search for in the collection.
Returns:True if a named destination with the specified name exists; otherwise, false.
Exceptions:Thrown when the name parameter is null.
Return an enumerator that iterates through the collection of named destinations.
public IEnumerator<NamedDestination> GetEnumerator()
An enumerator for the collection.
Implements:
Remove the named destination with the specified name and clean up its parent associations.
public bool Remove(string name)
The name of the named destination to remove.
Returns:True if the named destination was successfully found and removed; otherwise, false.
Exceptions:Thrown when the name parameter is null.
Try to retrieve the named destination associated with the specified name.
public bool TryGetValue(string name, out NamedDestination value)
The name of the destination to retrieve.
valueNamedDestinationWhen this method returns, contains the named destination associated with the specified name if found; otherwise, null.
Returns:True if a named destination with the specified name was found; otherwise, false.
Exceptions:Thrown when the name parameter is null.
Properties
Collection of all destination names in this collection.
public IEnumerable<string> Names { get; }
Get the named destination associated with the specified name.
public NamedDestination this[string name] { get; }
The name of the named destination to retrieve.
Property Value:The named destination with the specified name.
Exceptions:Thrown when no named destination with the specified name exists in the collection.