【绑定,什么时候必须用上下文】
c#吧
全部回复
仅看楼主
level 10
夕西行 楼主
绑定什么时候必须用上下文。
Button是直接绑定 :
Command="{Binding PlaceOrderCommand}"
CheckBox是用上下文:
Command="{Binding Path=DataContext.SelectMenuItemCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type DataGrid}}}"
直接绑SelectMenuItemCommand没反应。
2019年08月16日 09点08分 1
1