I would use a regular Button styled to have no UI, and would pass the ViewModel
to it using the CommandParameter
For example,
<ControlTemplate x:Key="ContentOnlyTemplate" TargetType="{x:Type Button}">
<ContentPresenter />
</ControlTemplate>
...
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Command="{Binding ElementName=MyItemsControl, Path=DataContext.MyClickCommand}"
CommandParameter="{Binding }"
Template="{StaticResource ContentOnlyTemplate}"
Content="{Binding }" />
</ItemsPanelTemplate>
</ItemsControl.ItemTemplate>
This will result in each item in your ItemsControl
being rendered using a Button, and the Button will execute whatever command you specify and pass the current ViewModel in as the CommandParameter
.
In this case, I've specified that the Button.Template
should be overwritten to use a ContentPresenter
which has no UI, so basically it will be whatever your DataTemplate
for each animal is.
There are some other solutions posted at this related WPF question too if you're interested: What is the best way to simulate a Click, with MouseUp & MouseDown events or otherwise?