GradientStopCollection.Item[Int32] 屬性

定義

取得或設定位於指定索引的 GradientStop,此索引以零起始。

public:
 property System::Windows::Media::GradientStop ^ default[int] { System::Windows::Media::GradientStop ^ get(int index); void set(int index, System::Windows::Media::GradientStop ^ value); };
public System.Windows.Media.GradientStop this[int index] { get; set; }
member this.Item(int) : System.Windows.Media.GradientStop with get, set
Default Public Property Item(index As Integer) As GradientStop

參數

index
Int32

要取得或設定的 GradientStop 的以零起始的索引。

屬性值

GradientStop

指定之索引處的 GradientStop

實作

例外狀況

valuenull

index 不是 GradientStopCollection 中的有效索引。

GradientStopCollection 為唯讀。

-或- GradientStopCollection 具有固定的大小。

備註

不同于 的一般實作,如果您嘗試插入 Null (Nothing) 參考,這個實作 IList<T>.Item[]ArgumentException 擲回 。

適用於