here is my problem, I want to pass the integer 1 when I click this canvas. Every time I click on the canvas, I get an unhandled exception like "System.InvalidCastException" that occurred in GalaSoft.MvvmLight.dll. Now I could make my life easier and just make RelayCommand accept String instead of int, but for the sake of learning. How will I do it this way
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonDown">
<cmd:EventToCommand Command="{Binding ButtonPress}"
CommandParameterValue="1"
</i:EventTrigger>
</i:Interaction.Triggers>
source
share