-
In net 8 Markup 4.1 (Didn't try Net 9, too buggy yet) In XAML, an eventtocommand behavior needs a cast:
In Markup, all I can find is something like this: var behavior = new EventToCommandBehavior Where the binding will take an element selected in a collection view. Parameter "parameter" (object) cannot be of type Microsoft.Maui.Controls.Binding, as the command type requires an argument of type System.EventArgs. (Parameter 'parameter') That happens very deep in the stack in, at least, Windows and Android (haven't tested in iOS and MacCat) This seems quite similar to the x:TypeArguments noted above. Questions: How can I cast in Markup the same way I'm doing it in Xaml? Or How can I pass a command parameter that works? DashboardMarkup.zip |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You shouldn't need to set the CommandParameter property as per this example in our docs: https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/behaviors/event-to-command-behavior#c-markup |
Beta Was this translation helpful? Give feedback.
Ok, I found the converters and they work for tapped and selected.
How do they work for Unfocused and TextChanged?
Do I need to extend them with a new converter?