title: DataGrid binding collection with nested Properties
body: <p>I have a Person and Address class. The Person class has properties like Name, Gender etc and Address. The Address class has properties like Street, City as strings. If I have a collection of Person called "people" which is a List(Of Person). And I bind "people" to a DataGrid in WPF. The Name column is fine, but the "City" column is always empty.</p>
  
  <pre><code>Class Address
  Sub New()
  End Sub
  Private _city As String
  Property City() As String
  Get
  Return _city 
  End Get
  Set(ByVal value As String)
  _city = vaule
  End Set
  End Property
  End Class
  
  Class Person
  Sub New()
  End Sub
  Private _name As String = ""
  Property Name() As String
  Get
  Return _name
  End Get
  Set(ByVal value As String)
  _name = vaule
  End Set
  End Property
  
  Private _address As Address
  Property Address() As Address
  Get
  Return _address 
  End Get
  Set(ByVal value As Address)
  _address = vaule
  End Set
  End Property
  
  End Class
  </code></pre>
  
  <p>Under the  Window_Loaded event, I have </p>
  
  <pre><code>Dim people As List(of Person) = _DAL.GetAllPeople()
  Me.myDataGrid.ItemsSource = people
  
  Dim nameBinding As Binding = New Binding
  nameBinding.Path = New PropertyPath("Name") 
  Me.nameColumn.Binding = nameBinding 'This works fine in datagrid
  
  Dim addressBinding As Binding = New Binding
  
  addressBinding.Path = New PropertyPath("Address.City")
  Me.cityColumn.Binding = addressBinding 'This does not work
  </code></pre>
  
  <p>XAML CODE:</p>
  
  <pre><code>&lt;DataGrid x:Name="myDataGrid" HorizontalAlignment="Left" Margin="8,177.4,0,38" Width="240" AutoGenerateColumns="False" &gt;
  &lt;DataGrid.Columns&gt;
  &lt;DataGridTextColumn x:Name="nameColumn" CanUserResize="False" IsReadOnly="True" Header="Name" Width="100"/&gt;
  &lt;DataGridTextColumn x:Name="cityColumn" CanUserResize="False" Header="City" IsReadOnly="True" Width="*" /&gt;
  &lt;/DataGrid.Columns&gt;
  &lt;/DataGrid&gt;
  </code></pre>