如何在代码(而不是XAML)中对WPF Toolkit DataGrid列 Headers 值进行数据绑定?
DataGridColumn fooColumn = new DataGridTextColumn
{
Header = "Foo",
Binding = new Binding {Path = new PropertyPath("BindingPath"),
Mode = BindingMode.OneWay}
};
这对柱的细胞含量进行了数据分配 . 但是我如何对头文本(“Foo”)本身进行数据绑定(比如说,视图模型上的字符串属性)?
2 回答
在最新版本中看起来像Header is a Dependancy Property