views:

11

answers:

1

If my programmer creates a .dll that I can reference in my WPF project, and his .dll contains an array or collection of continuously changing data, what is the best way for me to update many individual controls on my WPF form?

  1. The controls will be objects like textBlocks...
  2. The .dll can contain any type of data object for my program to access, and expose any properties necessary for effective connections to my controls...

Can I bind each control to individual array elements, or will I need a more sophisticated collection object?

What would be the best way to distribute the data to each control if binding won't work?

+1  A: 

I'm not sure what exactly you're asking. But if you want to update a collection of data in your view. I would use an ObservableCollection http://msdn.microsoft.com/en-us/library/ms668604.aspx. It automatically notifies your view of changes to the collection. So the easiest way is to expose the data as an ObservableCollection from your dll's and bind them to your views.

RonaldV