标签:
public class VMTest:Ad.Core.ViewModel.ViewModel { public static readonly VMTest instance = new VMTest(); private VMTest() { MyProperty = new ObservableCollection<BrowseHistory> (); } public static VMTest GetInstance() { return instance; } /// <summary> /// /// </summary> public ObservableCollection<BrowseHistory> MyProperty { get { return (ObservableCollection<BrowseHistory>)this.Property["MyProperty"]; } set { this.Property["MyProperty"] = value; } } public void Add(string id, string fileName) { BrowseHistory model = new BrowseHistory(); model.Id = id; model.FileName = fileName; MyProperty.Add(model); } }
标签:
原文地址:http://www.cnblogs.com/aguan/p/4333400.html