EventToCommandBehavior Entry Behavoir #484
-
I got a quick question. I use mvvm and in a particular case i depend on the event OnTextChanged from the control entry. Is it possible to convert this event but with keeping his parameters? Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@DeepWorksStudios it looks like you would need to implement your own converter that will convert the You could have a converter that simply returns the eventArgs (so it doesn't actually convert anything) and it would then be possible to use as your CommandParameter. I would ask though, is there anything specific you need out of the event args? If you don't need them then the binding will take of informing you when the Text has changed. |
Beta Was this translation helpful? Give feedback.
-
Closed as answered |
Beta Was this translation helpful? Give feedback.
@DeepWorksStudios it looks like you would need to implement your own converter that will convert the
TextChangeEventArgs
(guessing at name) over to something you want to use. Here is an example of a converter that we provide but we don't provide the one you want: https://github.com/CommunityToolkit/Maui/blob/main/src/CommunityToolkit.Maui/Converters/ItemTappedEventArgsConverter.shared.csYou could have a converter that simply returns the eventArgs (so it doesn't actually convert anything) and it would then be possible to use as your CommandParameter.
I would ask though, is there anything specific you need out of the event args? If you don't need them then the binding will take of informin…