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>

 

相关文章:

  • 2022-12-23
  • 2021-07-25
  • 2021-07-06
  • 2021-09-21
  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-01
  • 2021-09-15
  • 2021-05-21
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案