<Border Background="White"
BorderBrush="Gray"
BorderThickness="1"
CornerRadius="2">
<Border.InputBindings>
<MouseBinding Command="{Binding DataContext.BorderCommand, RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}}"
CommandParameter="{Binding}"
MouseAction="LeftClick" />
</Border.InputBindings>
</Border>
UIElement中有InputBindings属性,可以绑定鼠标事件,如上代码截取自DataGrid的自定义列中的一部分,可以实现非Button控件的Command绑定