Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wpf IEnumerable异步的虚拟回退值_Wpf_Xaml_Data Binding_Ienumerable_Fallbackvalue - Fatal编程技术网

Wpf IEnumerable异步的虚拟回退值

Wpf IEnumerable异步的虚拟回退值,wpf,xaml,data-binding,ienumerable,fallbackvalue,Wpf,Xaml,Data Binding,Ienumerable,Fallbackvalue,我试图调试我的MVVM程序(基于Josh Smith)中的一些数据绑定/性能问题。有很多不同列表和对象的并发加载,所以我一直在使用isAsync和一些线程来提高性能和网络瓶颈 然而,我注意到许多消息是从后备值上的ItemsSource绑定输出的。对于命令,我创建了一个禁用命令的伪命令,对于大多数情况,我可以绑定到已知的回退原语类型。当我将ItemsSource的回退绑定到{x:Null}时,问题似乎出现了 注意:这发生在许多地方,而不仅仅是chartingToolkit控件 我的问题是:

我试图调试我的MVVM程序(基于Josh Smith)中的一些数据绑定/性能问题。有很多不同列表和对象的并发加载,所以我一直在使用isAsync和一些线程来提高性能和网络瓶颈

然而,我注意到许多消息是从后备值上的ItemsSource绑定输出的。对于命令,我创建了一个禁用命令的伪命令,对于大多数情况,我可以绑定到已知的回退原语类型。当我将ItemsSource的回退绑定到{x:Null}时,问题似乎出现了

注意:这发生在许多地方,而不仅仅是chartingToolkit控件



我的问题是:

  • 这些信息令人担忧吗?我的很多终端用户都有较旧的机器(并且拒绝升级-。-),所以我一直在尝试最大限度地提高性能
  • 是否安全地创建虚拟基类型并从App.xaml引用它们
  • 我知道这些列表中的大多数,这是造成这种情况的原因吗
  • 提前感谢。

    在加载真实数据源时,您可以使用绑定到虚拟数据源。 我希望这会有所帮助。

    在加载真实数据源时,您可以使用绑定到虚拟数据源。
    我希望这能有所帮助。

    是的,但是什么虚拟数据源对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}}">