Xaml 绑定警告无效时的回退

Xaml 绑定警告无效时的回退,xaml,binding,warnings,fallback,Xaml,Binding,Warnings,Fallback,我有一些无法解决的绑定警告: System.Windows.Data信息:10:无法使用 绑定且不存在有效的回退值;改为使用默认值。 BindingExpression:Path=AddNewObjectCommand;DataItem=null;目标 元素是“ButtonWithIcon”(Name='uc');目标属性为 “ButtonCommand”(键入“ICommand”) 我的理解是,我应该使用回退值。这适用于简单的对象类型,但是不知道如何处理复杂对象,如列表,或者在这种情况下使用命

我有一些无法解决的绑定警告:

System.Windows.Data信息:10:无法使用 绑定且不存在有效的回退值;改为使用默认值。 BindingExpression:Path=AddNewObjectCommand;DataItem=null;目标 元素是“ButtonWithIcon”(Name='uc');目标属性为 “ButtonCommand”(键入“ICommand”)

我的理解是,我应该使用回退值。这适用于简单的对象类型,但是不知道如何处理复杂对象,如列表,或者在这种情况下使用命令

以下是我尝试过的,但运气不佳:

<controls:ButtonWithIcon ButtonCommand="{Binding CancelCommand, FallbackValue={x:Null}}" />

你有什么想法吗

提前谢谢你