Class
GradientStopCollection

Mutable list of gradient stops that define the color ramp for a gradient fill.

Definition

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

Assembly:Telerik.Windows.Documents.Fixed.dll

Syntax:

cs-api-definition
public class GradientStopCollection : IList<GradientStop>, ICollection<GradientStop>, IEnumerable<GradientStop>, IEnumerable

Inheritance: objectGradientStopCollection

Implements: ICollection<GradientStop>IEnumerableIEnumerable<GradientStop>IList<GradientStop>

Constructors

GradientStopCollection()

Creates an empty collection of gradient stops.

Declaration

cs-api-definition
public GradientStopCollection()

Properties

Count

Gets the number of elements contained in the ICollection<T>.

Declaration

cs-api-definition
public int Count { get; }

Property Value

int

The number of elements contained in the ICollection<T>.

Implements ICollection<GradientStop>.Count

IsReadOnly

Gets a value indicating whether the ICollection<T> is read-only.

Declaration

cs-api-definition
public bool IsReadOnly { get; }

Property Value

bool

true if the ICollection<T> is read-only; otherwise, false.

Implements ICollection<GradientStop>.IsReadOnly

this[int]

Gets or sets the GradientStop at the specified index.

Declaration

cs-api-definition
public GradientStop this[int index] { get; set; }

Parameters

index

int

Property Value

GradientStop

The gradient stop at the specified index.

Implements IList<GradientStop>.this[int]

Methods

Add(GradientStop)

Adds the specified item.

Declaration

cs-api-definition
public void Add(GradientStop item)

Parameters

item

GradientStop

The gradient stop to add to the collection.

Implements ICollection<GradientStop>.Add(GradientStop)

Clear()

Removes all items from the ICollection<T>.

Declaration

cs-api-definition
public void Clear()

Exceptions

NotSupportedException

The ICollection<T> is read-only.

Implements ICollection<GradientStop>.Clear()

Contains(GradientStop)

Determines whether [contains] [the specified item].

Declaration

cs-api-definition
public bool Contains(GradientStop item)

Parameters

item

GradientStop

The gradient stop to locate in the collection.

Returns

bool

True if the gradient stop is found in the collection; otherwise, false.

Implements ICollection<GradientStop>.Contains(GradientStop)

CopyTo(GradientStop[], int)

Copies to.

Declaration

cs-api-definition
public void CopyTo(GradientStop[] array, int arrayIndex)

Parameters

array

GradientStop[]

The destination array to copy gradient stops to.

arrayIndex

int

The zero-based index in the destination array at which copying begins.

Implements ICollection<GradientStop>.CopyTo(GradientStop[], int)

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration

cs-api-definition
public IEnumerator<GradientStop> GetEnumerator()

Returns

IEnumerator<GradientStop>

A IEnumerator<T> that can be used to iterate through the collection.

Implements IEnumerable<GradientStop>.GetEnumerator()

IndexOf(GradientStop)

Determines the index of a specific gradient stop in the collection.

Declaration

cs-api-definition
public int IndexOf(GradientStop item)

Parameters

item

GradientStop

The gradient stop to locate in the collection.

Returns

int

The zero-based index of the first occurrence of the gradient stop within the collection, or -1 if not found.

Implements IList<GradientStop>.IndexOf(GradientStop)

Insert(int, GradientStop)

Inserts a gradient stop at the specified index.

Declaration

cs-api-definition
public void Insert(int index, GradientStop item)

Parameters

index

int

The zero-based index at which to insert the gradient stop.

item

GradientStop

The gradient stop to insert into the collection.

Implements IList<GradientStop>.Insert(int, GradientStop)

Remove(GradientStop)

Removes the specified item.

Declaration

cs-api-definition
public bool Remove(GradientStop item)

Parameters

item

GradientStop

The gradient stop to remove from the collection.

Returns

bool

True if the gradient stop was successfully removed; otherwise, false.

Implements ICollection<GradientStop>.Remove(GradientStop)

RemoveAt(int)

Removes the IList<T> item at the specified index.

Declaration

cs-api-definition
public void RemoveAt(int index)

Parameters

index

int

The zero-based index of the item to remove.

Exceptions

ArgumentOutOfRangeException

index is not a valid index in the IList<T>.

NotSupportedException

The IList<T> is read-only.

Implements IList<GradientStop>.RemoveAt(int)