MVVM ICommand.CanExecute parameter is null
CommandParameter="{Binding}"
改为
CommandParameter="{Binding DataContext,RelativeSource={RelativeSource Self}}"
<StackPanel Orientation="Horizontal" > <Button Content="×" CommandParameter="{Binding DataContext,RelativeSource={RelativeSource Self}}" Command="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=DataContext.CmdConvertToFalse}"></Button> <Button Content="√" CommandParameter="{Binding DataContext,RelativeSource={RelativeSource Self}}" Command="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=DataContext.CmdConvertToTrue}"></Button> </StackPanel>
-----------------------------------
http://www.cnblogs.com/rock_chen/