EventToCommandBehavior should have an option PassEventArgsToCommand #737
Replies: 3 comments 1 reply
-
It does appear that we are missing documentation on how to achieve this but it is already possible through the use of the generic |
Beta Was this translation helpful? Give feedback.
-
Hi @bijington,
Which already casts the parameters to the type I need without me having to provide further information to the EventToCommandBehavior converter. Unless there has been a change to how you should implement ICommand for Maui that I don't understand I would still argue it should just be a boolean flag which passes the EventArgs as object and allows the handler to deal with it as needed. |
Beta Was this translation helpful? Give feedback.
-
Closed and answered |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Simple really, huge oversight in my opinion that EventToCommandBehavior does not have an option
PassEventArgsToCommand="True|False"
like every other implementation of EventToCommandBehaviour I have previously used.I was able to get around this issue by simply creating a BaseConverterOneWay which looked like this:
and adding it as such (for anyone else with the same issue)
Which achieved what I needed but this is pretty silly given that the overwhelming amount of users are simply going to want the EventArgs passed as they stand without any mutations.
Just my two cents...
Beta Was this translation helpful? Give feedback.
All reactions