Class NamedDestinationsCollection
Represents a collection of named destinations that provide navigational targets within the document.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.Fixed.Model.Collections
Assembly: Telerik.Windows.Documents.Fixed.dll
Syntax
public sealed class NamedDestinationsCollection : IEnumerable<NamedDestination>, IEnumerable
Constructors
NamedDestinationsCollection(IDestinationContainer)
Properties
Count
Gets the number of named destinations contained in the collection.
Declaration
public int Count { get; }
Property Value
|
System.Int32
|
Item[String]
Gets the named destination associated with the specified name from the collection.
Declaration
public NamedDestination this[string name] { get; }
Parameters
|
System.String
name
The name of the named destination to retrieve. |
Property Value
|
NamedDestination
The named destination with the specified name. |
Exceptions
|
System.Collections.Generic.KeyNotFoundException
Thrown when no named destination with the specified name exists in the collection. |
Names
Gets a collection containing all the destination names in this collection.
Declaration
public IEnumerable<string> Names { get; }
Property Value
|
System.Collections.Generic.IEnumerable<System.String>
|
Methods
Add(String, GoToAction)
Creates and adds a new named destination with the specified name and go-to action to the collection.
Declaration
public NamedDestination Add(string name, GoToAction goToAction)
Parameters
|
System.String
name
The unique name to assign to the named destination. |
|
GoToAction
goToAction
The go-to action that defines the navigation behavior for this named destination. |
Returns
|
NamedDestination
The newly created named destination instance. |
Exceptions
|
System.ArgumentNullException
Thrown when the name or goToAction parameter is null. |
|
System.ArgumentException
Thrown when an element with the same name already exists in the collection. |
Add(String, Destination)
Clear()
Removes all named destination from the collection.
Declaration
public void Clear()
ContainsName(String)
Determines whether a named destination with the specified name exists in the collection.
Declaration
public bool ContainsName(string name)
Parameters
|
System.String
name
The name to search for in the collection. |
Returns
|
System.Boolean
True if a named destination with the specified name exists; otherwise, false. |
Exceptions
|
System.ArgumentNullException
Thrown when the name parameter is null. |
GetEnumerator()
Returns an enumerator that iterates through the collection of named destinations.
Declaration
public IEnumerator<NamedDestination> GetEnumerator()
Returns
|
System.Collections.Generic.IEnumerator<NamedDestination>
An enumerator for the collection. |
Implements
Remove(String)
Removes the named destination with the specified name from the collection and cleans up its parent associations.
Declaration
public bool Remove(string name)
Parameters
|
System.String
name
The name of the named destination to remove. |
Returns
|
System.Boolean
True if the named destination was successfully found and removed; otherwise, false. |
Exceptions
|
System.ArgumentException
Thrown when the name parameter is null. |
Rename(String, String)
Changes the name of an existing named destination in the collection.
Declaration
public void Rename(string oldName, string newName)
Parameters
|
System.String
oldName
The current name of the named destination to rename. |
|
System.String
newName
The new name to assign to the named destination. |
TryGetValue(String, out NamedDestination)
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
|
System.Collections.IEnumerator
|