This might be a bit of a hack but you can derive from the KeyBinding
class:
public class BoolKeyBinding : KeyBinding
{
public bool Parameter
{
get { return (bool)CommandParameter; }
set { CommandParameter = value; }
}
}
Usage:
<local:BoolKeyBinding ... Parameter="True"/>
And another not so weird solution:
xmlns:s="clr-namespace:System;assembly=mscorlib"
<Application.Resources>
<!-- ... -->
<s:Boolean x:Key="True">True</s:Boolean>
<s:Boolean x:Key="False">False</s:Boolean>
</Application.Resources>
Usage:
<KeyBinding ... CommandParameter="{StaticResource True}"/>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…