September 20th, 2012, 05:41 PM
Databinding on a ListView from non-ObservableCollection
I am using WPF for a new project with my company and I do not have previous experience with WPF. I am having problems list a collection on a listview on the WPF interface.
Our solution is setup in the following:
Project A - Contain's core functions and item collections retrieved over the network connections
Project B - Contain's our WinForms interface which is used for displaying the data from project A but we want to make this our legacy interface and continue our development on WPF
Project C - Contain our WPF interface which we plan on displaying and allowing the user to interact with our data from Project A
Now the problem I have is that Project A maintains a List of objects that is received over the network and can come in at any time, and is typically updated at a fairly fast rate. I want to display the objects that are in the list on a ListView on the WPF UI but I get errors that I do not have an ObservableCollection to bind to the ListView. Are there standard ways for displaying data in WPF without using WPF binding friendly collections?
The only way I can think to do it right now is to copy the entire List over to a ObservableCollection which can then bind to the ListView but that seems to be a very wasteful way to do it, especially if the list can be a fairly large number of items and we want to see updates at a fairly regular interval.
Any suggestions on how to properly do this?
Thanks for any help!
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!