当我将CommandParameter
设置为{x:Null}
时,会从EventToCommandBehavior
类中的OnEvent
方法抛出此异常:
未处理的异常:
System.InvalidCastException:发生
XAML:
<ContentView.Behaviors>
<local:EventToCommandBehavior EventName="BindingContextChanged" Command="{Binding LoadCategoriesCommand}" CommandParameter="{x:Null}"/>
</ContentView.Behaviors>