WPF使用HTML将动态列绑定到DataGrid

WPF使用HTML将动态列绑定到DataGrid,wpf,binding,datagrid,Wpf,Binding,Datagrid,我正在成功地使用这个工具。但是,可绑定动态字典中的键的列名来自另一个允许HTML标记等的程序。有没有办法在不删除字符的情况下转义/忽略这些字符 我明白了: System.Windows.Data Error: 17 : Cannot get '<b>Filling<' value (type 'Object') from '' (type 'BindableDynamicDictionary'). BindingExpression:Path=<b>Filling&

我正在成功地使用这个工具。但是,可绑定动态字典中的键的列名来自另一个允许HTML标记等的程序。有没有办法在不删除字符的情况下转义/忽略这些字符

我明白了:

System.Windows.Data Error: 17 : Cannot get '<b>Filling<' value (type 'Object') from '' (type 'BindableDynamicDictionary'). BindingExpression:Path=<b>Filling</b>; DataItem='BindableDynamicDictionary' (HashCode=52143524); target element is 'ValueHolder' (HashCode=10973391); target property is 'Value' (type 'Object') InvalidOperationException:'System.InvalidOperationException: Property path is not valid. 'System.Dynamic.DynamicObject+MetaDynamic' does not have a public property named 'Items'.
如您所见,问题在于:

BindingExpression:Path=<b>Filling</b>
它最终尝试在字典中查找:

<b>Filling<
非常感谢您的帮助。

这里提供了解决此问题所需的信息,特别是属性路径字符串的转义部分


因为我使用字典作为数据源,所以使用索引器[]可以正确地转义HTML字符。我确实发现,即使是像“.”和“/”这样的字符也会导致绑定失败,因为这些字符在XAML解析器中有意义。

我在“[]”中接近了属性,但它不太起作用。有什么想法吗?我的另一个问题是‘房地产做什么?’