I am refractoring the code from sample:
In your Window1.xaml
class remove the reference to the skills class: (e.g. <local:Skills>
) since you don't have a Skills class anymore. Instead you want a number of Skill
elements inside your ObservableCollection:
<local:Team>
<local:Employee Name="Larry" Age="21">
<local:Employee.Skills>
<local:Skill />
<local:Skill />
....
Also, you should probably initialize the Skills ObservableCollection inside the Employee's constructor.