Questions tagged «routed-commands»

6
XAML中的布尔CommandParameter
我有以下代码(工作正常): <KeyBinding Key="Enter" Command="{Binding ReturnResultCommand}"> <KeyBinding.CommandParameter> <s:Boolean> True </s:Boolean> </KeyBinding.CommandParameter> </KeyBinding> 当然,“ s”是系统名称空间。 但是此命令被调用了好几次,并且实际上会使其他相当简单的XAML代码膨胀。这真的是XAML中布尔命令参数的最短表示法(​​除了将命令分成几个命令之外)吗?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.