Caliburn.Micro
Caliburn.Micro copied to clipboard
Action doesn't take parameter type into account
I have the following Datagrid in a UserControl
<DataGrid x:Name="BridgeClubs"
cal:Message.Attach="[Event MouseDoubleClick] = [Action ShowTournaments($this)]">
And my view has two versions of ShowTournaments, namely: public void ShowTournaments(BridgeClub club) and public void ShowTournaments(BridgeCenter center)
The problem is that whenever I double click on a row in the datagrid it calls whichever version of ShowTournaments appears first in the views source code! So it doesn't try to match the parameter types!
Thanks. You can change the behavior in your project by changing ActionMessage.GetTargetMethod, happy to also see a PR for it.