GeometryGuideCollection Class
Represents a collection of GeometryGuides that govern the geometry.
public sealed class GeometryGuideCollection : Collection<GeometryGuide>, IList, ICollection, IList<GeometryGuide>, ICollection<GeometryGuide>, IEnumerable<GeometryGuide>, IEnumerable
Public NotInheritable Class GeometryGuideCollection
Inherits Collection(Of GeometryGuide)
Implements IList, ICollection, IList(Of GeometryGuide), ICollection(Of GeometryGuide), IEnumerable(Of GeometryGuide), IEnumerable
- Inheritance:
- System.ObjectGeometryGuideCollection
Implements
Properties
Count
Gets the number of GeometryGuides contained in the collection.
Property Value
- System.Int32
The number of GeometryGuides contained in the collection.
Item[Int32]
Gets or sets the GeometryGuide at the specified index.
public GeometryGuide this[int index] { get; set; }
Public Property Item(index As Integer) As GeometryGuide
Parameters
index
- System.Int32
The zero-based index of the GeometryGuide to get or set.
Property Value
The GeometryGuide at the specified index.
Exceptions
- System.ArgumentOutOfRangeException
index
is less than zero or index
is equal to or greater than Count.
Methods
Add(GeometryGuide)
Adds a GeometryGuide to the end of the collection.
Parameters
item
- GeometryGuide
The GeometryGuide to be added to the end of the collection.
Exceptions
- System.ArgumentNullException
item
is null.
AddLiteralValue(String, Length)
Adds the literal Length value geometry guide to the current collection.
public GeometryGuide AddLiteralValue(string name, Length value)
Public Function AddLiteralValue(name As String, value As Length) As GeometryGuide
Parameters
name
- System.String
The geometry guide name.
Returns
A newly added GeometryGuide instance.
AddLiteralValue(String, Int32)
Adds the literal System.Int32 value geometry guide to the current collection.
public GeometryGuide AddLiteralValue(string name, int value)
Public Function AddLiteralValue(name As String, value As Integer) As GeometryGuide
Parameters
name
- System.String
The geometry guide name.
value
- System.Int32
The geometry guide System.Int32 value that usually represents an angle in 60,000ths of a degree.
Returns
A newly added GeometryGuide instance.
AddLiteralValue(String, String)
Adds the literal System.String value geometry guide to the current collection.
public GeometryGuide AddLiteralValue(string name, string value)
Public Function AddLiteralValue(name As String, value As String) As GeometryGuide
Parameters
name
- System.String
The geometry guide name.
value
- System.String
The geometry guide System.String value that is either a geometry guide name or a formatted numeric value with an optional measurement unit.
Returns
A newly added GeometryGuide instance.
Exceptions
- System.ArgumentNullException
name
or value
is null or System.String.Empty.
Clear()
Removes all GeometryGuides from the collection.
Contains(GeometryGuide)
Determines whether a GeometryGuide is in the collection.
public bool Contains(GeometryGuide item)
Public Function Contains(item As GeometryGuide) As Boolean
Parameters
item
- GeometryGuide
The GeometryGuide to locate in the collection.
Returns
- System.Boolean
true if item
is found in the collection; otherwise, false.
Exceptions
- System.ArgumentNullException
item
is null.
GetEnumerator()
Returns an enumerator that iterates through the GeometryGuideCollection.
public IEnumerator<GeometryGuide> GetEnumerator()
Public Function GetEnumerator As IEnumerator(Of GeometryGuide)
Returns
- System.Collections.Generic.IEnumerator<GeometryGuide>
An System.Collections.Generic.IEnumerator<T> for the collection.
IndexOf(GeometryGuide)
Searches for the specified GeometryGuide and returns the zero-based index of the first occurrence within the entire collection.
public int IndexOf(GeometryGuide item)
Public Function IndexOf(item As GeometryGuide) As Integer
Parameters
item
- GeometryGuide
The GeometryGuide to locate in the collection.
Returns
- System.Int32
The zero-based index of the first occurrence of item
within the entire collection, if found; otherwise, -1.
Insert(Int32, GeometryGuide)
Inserts a GeometryGuide to the collection at the specified index.
public void Insert(int index, GeometryGuide item)
Public Sub Insert(index As Integer, item As GeometryGuide)
Parameters
index
- System.Int32
The zero-based index at which GeometryGuide should be inserted.
item
- GeometryGuide
The GeometryGuide to insert into the collection.
Exceptions
- System.ArgumentOutOfRangeException
index
is less than zero or index
is equal to or greater than Count.
Remove(GeometryGuide)
Removes the first occurrence of a specific GeometryGuide from the collection.
public bool Remove(GeometryGuide item)
Public Function Remove(item As GeometryGuide) As Boolean
Parameters
item
- GeometryGuide
The GeometryGuide to remove from the collection.
Returns
- System.Boolean
true if item
is successfully removed; otherwise, false. This method also returns false if item
was not found in the original collection.
RemoveAt(Int32)
Removes the GeometryGuide at the specified index of the collection.
Parameters
index
- System.Int32
The zero-based index of the GeometryGuide to remove.
Exceptions
- System.ArgumentOutOfRangeException
index
is less than zero or index
is equal to or greater than Count.