Share via


IAttachedCollectionSource.Items 屬性

定義

視需要取得 (並建立 ,) 與此 IAttachedCollectionSource 相關聯的專案集合。

public:
 property System::Collections::IEnumerable ^ Items { System::Collections::IEnumerable ^ get(); };
public System.Collections.IEnumerable Items { get; }
member this.Items : System.Collections.IEnumerable
Public ReadOnly Property Items As IEnumerable

屬性值

傳回 IEnumerable

備註

如果傳回初始集合之後,此集合不會變更,您可以傳回 IEnumerable 的任何實作。 不過,如果此集合會隨著時間而變更,您可以傳回任何實作 INotifyCollectionChanged 的集合 (,例如 ObservableCollection) 。 如果您傳回實作 INotifyCollectionChanged 的集合,集合的取用者將會觀察集合的變更,並在修改集合時更新集合上的檢視。

適用於