I have a form in WPF with 2 text fields:
<TextBox Name="txtName" Text="{Binding Contact.Name}"/>
<TextBox Name="txtAddressNumber" Text="{Binding Contact.Address.Number}"/>
and I have class 2:
public class ContactEntity
{
public string Name {get;set;}
public AddressEntity Address {get;set;}
}
public class AddressEntity
{
public int Number {get;set}
}
The Name property binds the penalty. But the Number property of the Address object inside the Contact object is not bound. What am I doing wrong?
source
share