I have a test collection like:
ObservableCollection<Person> MyselectedPeople = new ObservableCollection<Person>(); public MainWindow() { InitializeComponent(); FillData(); } public void FillData() { Person p1 = new Person(); p1.NameFirst = "John"; p1.NameLast = "Doe"; p1.Address = "123 Main Street"; p1.City = "Wilmington"; p1.DOBTimeStamp = DateTime.Parse("04/12/1968").Date; p1.EyeColor = "Blue"; p1.Height = "601"; p1.HairColor = "BRN"; MyselectedPeople.Add(p1); }
As soon as I build this collection, I would like to be able to convert the Observable Collection into a list of types.
The reason for this is my main project - getting a shared list with data that I have to convert to an Observable collection for use in gridview, listboxes, etc. Data is selected in the user interface, and then sent back to the original assembly for future use.
c # wpf observablecollection
rlcrews
source share