xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="HierarchicalBinding" xmlns:local="clr-namespace:WpfApplication1">
ItemsSource="{Binding Path=Members}">
ItemsSource="{Binding Path=Comments}">
(age: )
//File:Window.xaml.cs
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Media;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
namespace WpfApplication1 {
public class Comment {
string description;
public string Description {
get { return description; }
set { description = value; }
}
}
public class Comments : ObservableCollection { }
public class Employee {
string name;
public string Name {
get { return name; }
set { name = value; }
}
int age;
public int Age {
get { return age; }
set { age = value; }
}
Comments traits;
public Comments Comments {
get { return traits; }
set { traits = value; }
}
}
public class People : ObservableCollection { }
public class Company {
string familyName;
public string CompanyName {
get { return familyName; }
set { familyName = value; }
}
People members;
public People Members {
get { return members; }
set { members = value; }
}
}
public class Companies : ObservableCollection { }
public partial class Window1 : Window {
public Window1() {
InitializeComponent();
}
}
}