/// <summary> /// 指定当前的子集合。 /// 用于同步每一个子元素的 Document 字段。 /// </summary> /// <param name="children"></param> protected void AddChildren(INotifyChangedCollection children) { children.CollectionChanged += children_CollectionChanged; foreach (DocumentViewModel child in children) { child.Document = Document; } }
/// <summary> /// 指定当前的子集合。 /// 用于同步每一个子元素的 Document 字段。 /// </summary> /// <param name="children"></param> protected void AddChildren(INotifyChangedCollection children) { children.CollectionChanged += children_CollectionChanged; foreach (DocumentViewModel child in children) { child.Document = Document; } }
public void Setup() { _collection = new NotifyChangedCollection<int>(new[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}); }