Wpf IEnumerable异步的虚拟回退值
我试图调试我的MVVM程序(基于Josh Smith)中的一些数据绑定/性能问题。有很多不同列表和对象的并发加载,所以我一直在使用isAsync和一些线程来提高性能和网络瓶颈 然而,我注意到许多消息是从后备值上的ItemsSource绑定输出的。对于命令,我创建了一个禁用命令的伪命令,对于大多数情况,我可以绑定到已知的回退原语类型。当我将ItemsSource的回退绑定到{x:Null}时,问题似乎出现了 注意:这发生在许多地方,而不仅仅是chartingToolkit控件Wpf IEnumerable异步的虚拟回退值,wpf,xaml,data-binding,ienumerable,fallbackvalue,Wpf,Xaml,Data Binding,Ienumerable,Fallbackvalue,我试图调试我的MVVM程序(基于Josh Smith)中的一些数据绑定/性能问题。有很多不同列表和对象的并发加载,所以我一直在使用isAsync和一些线程来提高性能和网络瓶颈 然而,我注意到许多消息是从后备值上的ItemsSource绑定输出的。对于命令,我创建了一个禁用命令的伪命令,对于大多数情况,我可以绑定到已知的回退原语类型。当我将ItemsSource的回退绑定到{x:Null}时,问题似乎出现了 注意:这发生在许多地方,而不仅仅是chartingToolkit控件 我的问题是:
我的问题是:
我希望这能有所帮助。是的,但是什么虚拟数据源对IEnumerable安全?是的,但是什么虚拟数据源对IEnumerable安全?
A first chance exception of type 'System.NotSupportedException' occurred in PresentationFramework.dll
A first chance exception of type 'System.Xaml.XamlObjectWriterException' occurred in System.Xaml.dll
System.Windows.Data Information: 41 : BindingExpression path error: 'LineValueList' property not found for 'object' because data item is null. This could happen because the data provider has not produced any data yet. BindingExpression:Path=LineValueList; DataItem=null; target element is 'LineSeries' (Name=''); target property is 'ItemsSource' (type 'IEnumerable')
System.Windows.Data Information: 20 : BindingExpression cannot retrieve value due to missing information. BindingExpression:Path=LineValueList; DataItem=null; target element is 'LineSeries' (Name=''); target property is 'ItemsSource' (type 'IEnumerable')
System.Windows.Data Information: 21 : BindingExpression cannot retrieve value from null data item. This could happen when binding is detached or when binding to a Nullable type that has no value. BindingExpression:Path=LineValueList; DataItem=null; target element is 'LineSeries' (Name=''); target property is 'ItemsSource' (type 'IEnumerable')
<chartingToolkit:LineSeries DependentValuePath="Value" IndependentValuePath="Key" ItemsSource="{Binding Path=LineValueList,IsAsync=True,FallbackValue={x:Null}}">