我是David。我不知道如何在WPF应用程序中使用XAML将集合绑定到DataGrid。
以下是相关的类。
以下是相关的类。
class TestSetting(): INotifyChanged
{
private a
public double A
{
get a;
set a = value;
Notify("A");
}
private b
public double B
{
get b;
set b = value;
Notify("B");
}
private c
public double C
{
get c;
set c = value;
Notify("C");
}
}
class TestCollect():ObservableCollection<T> ,INotifyListener
{
}
上面的代码是伪代码。
DataContext有7个项目。所以网格将有7列。请问有人可以给我一个示例或代码片段吗?