BindingExpression 产生的值对目标无效

Ere*_*rez 6 data-binding wpf binding

System.Windows.Data Error: 5 : 
  Value produced by BindingExpression is not valid for target property.; 
  Value='<null>' BindingExpression:Path=Attributes[AssetSL]; 
  DataItem='DataBinding' (HashCode=4074007); 
  target element is 'RegionSSIn' (Name='rssi'); 
  target property is 'AService' (type 'SLG')
Run Code Online (Sandbox Code Playgroud)

那异常是什么意思?

Dam*_*cus 4

这仅意味着您的输出中所说的内容:您的绑定产生了一个控件不接受的值。

元素RegionSSln中的属性AService绑定到错误值。您可以尝试使用转换器来获得合适的值。

举个例子,如果您尝试将 a 绑定Visibility到 an ,也会发生同样的问题Integer:它将产生相同的错误:控件正在等待类型为 的对象Visibility,并且有其他对象