0

I need to bind an arry of textblocks(which will be created by code behind) to an Observable Collection of some User Defined Type, so that each textblock will have one and unique element of ObsColl item.

public class Car { private string _make;

    public Car(string make)
    {
        _make = make;            
    } 
}

Now i need to create an Observable collection of this class and need to create an array of Textblocks. Text property of will be Car.Make

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
Dheeraj
  • 69
  • 1
  • 9
  • You should explore more UI controls that will help you accomplish what you're looking for. For example, Listbox: http://msdn.microsoft.com/en-us/library/system.windows.forms.listbox.aspx – William Melani Aug 24 '11 at 16:42

1 Answers1

1

You can style a ListBox to show the ObservableCollection of Cars and then also get the text for each Car.Make.

Here is an example: http://3water.wordpress.com/2010/07/25/listbox-on-wp7/

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
invalidusername
  • 912
  • 9
  • 26