I have an observable collection in my window class that I want to be able to bind to a listview in the xaml. I have been googling around for the best part of an hour and a half now and all I can seem to come up with as a response is "Wow, why does it have to be so mental?"

I would really appreciate it if someone could shed some light on this, my collection is called "TestItems", and a test Item has two variables - "name" and "type" - both strings.

I would like to display all of the "name" properties of the TestItems in my observable collection... 

Any help appreciated, I have even managed to mock this up with C++ and Qt in a matter of minutes, yet it seems to elude me in C# right now.

Current xaml : 

```
<ListBox Name="ItemsOfData" 
     ItemsSource="{Binding TestItems}" 
     DisplayMemberPath="name" 
     IsSynchronizedWithCurrentItem="True">
</ListBox>

```

Current C# code :

```
public ObservableCollection<TestItem> TestItems = new ObservableCollection<TestItem>();

public partial class MainWindow : Window
{
    public ObservableCollection<TestItem> TestItems = new ObservableCollection<TestItem>();

    public MainWindow()
    {
        InitializeComponent();

        this.DataContext = this.ItemsOfData;

        TestItem test = new TestItem("name", "type");

        this.TestItems.Add(test);
    }
}

```