ClassNamedDestinationsCollection
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
Inheritance: objectNamedDestinationsCollection
Implements:
Constructors
NamedDestinationsCollection(IDestinationContainer)
Create a named-destinations registry so links and actions can target pages or views by name.
Declaration
public NamedDestinationsCollection(IDestinationContainer parent)
Parameters
parent
The parent.
Properties
Count
Number of named destinations contained in the collection.
Names
Collection of all destination names in this collection.
Declaration
public IEnumerable<string> Names { get; }
Property Value
IEnumerable<string>
this[string]
Get the named destination associated with the specified name.
Declaration
public NamedDestination this[string name] { get; }
Parameters
name
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.
Methods
Add(string, Destination)
Add a new named destination with the specified name and destination target.
Declaration
public NamedDestination Add(string name, Destination destination)
Parameters
name
The unique name to assign to the named destination.
destination
The 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(string, GoToAction)
Add a new named destination with the specified name and go-to action.
Declaration
public NamedDestination Add(string name, GoToAction goToAction)
Parameters
name
The unique name to assign to the named destination.
goToAction
The 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.
Clear()
Remove all named destinations from the collection.
Declaration
public void Clear()
ContainsName(string)
Determine whether a named destination with the specified name exists.
Declaration
public bool ContainsName(string name)
Parameters
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.
GetEnumerator()
Return an enumerator that iterates through the collection of named destinations.
Declaration
public IEnumerator<NamedDestination> GetEnumerator()
Returns
IEnumerator<NamedDestination>
An enumerator for the collection.
Remove(string)
Remove the named destination with the specified name and clean up its parent associations.
Declaration
public bool Remove(string name)
Parameters
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.
Rename(string, string)
Change the name of an existing named destination in the collection.
TryGetValue(string, out NamedDestination)
Try to retrieve the named destination associated with the specified name.
Declaration
public bool TryGetValue(string name, out NamedDestination value)
Parameters
name
The name of the destination to retrieve.
value
When 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.