namespace TestUI.ViewModels { using System.Collections.ObjectModel; public class ItemsRowVM : BaseVM { private int row; public ItemsRowVM(int row) { this.row = row; this.Items = new ObservableCollection(); } public ObservableCollection Items { get; } internal void Add(object value) { this.Items.Add(new ItemVM { Row = this.row, Col = this.Items.Count, Value = value }); } } }