我有一个简单的数据网格,我使用 ItemsSource 将集合绑定到该数据网格。在我的 c# 代码中,我不想检索列的绑定路径。我参考了专栏。这是我提出的非工作代码
DataGridBoundColumn column = getColumn() //function to get column. Already working
BindingBase binding = column.Binding; //get the binding
PropertyPath path = //how to get the path from binding.