Caliburn.Micro icon indicating copy to clipboard operation
Caliburn.Micro copied to clipboard

Action doesn't take parameter type into account

Open mortensp opened this issue 6 years ago • 1 comments

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!

mortensp avatar Dec 09 '18 09:12 mortensp

Thanks. You can change the behavior in your project by changing ActionMessage.GetTargetMethod, happy to also see a PR for it.

nigel-sampson avatar Dec 13 '18 01:12 nigel-sampson