WPF datagrid header text binding

后端 未结 9 2300
执念已碎
执念已碎 2020-11-27 18:01

The column header of the DataGrid is not a FrameWork element for some reason, and so you cannot use bindings to set things like the header text. Please correct me if that is

9条回答
  •  南笙
    南笙 (楼主)
    2020-11-27 18:42

    BTW, in Silverlight (tested with SL 3.0) you can simply use the Header property as the DataContext for the ControlTemplate set via HeaderStyle (see my related question on SO).

    I just tried this solution in WPF 3.5 using the WPF Toolkit DataGrid and it works!

提交回复
热议问题