You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m working on a task related to updating the [RelayCommand] attribute, and I wanted to inquire about the possibility of overriding the source generators when using this attribute in the CommunityToolkit.Mvvm library.
Specifically, I’m considering a scenario where the showProgress functionality could be controlled directly via the attribute, such as:
The main focus of this work item is to explore whether we can extend or modify the behavior of the [RelayCommand] attribute using parameters like showProgress without needing to manually manage it in each command.
Currently, I use the following approach, which accomplishes my desired behaviour using MVVM, without [RelayCommand] attribute .
publicAsyncRelayCommandRegisterUserCommand{get;}publicRegisterViewModel(){SetupAsyncRelayCommand(RegisterUser,true,false);}asyncTaskRegisterUser(){// Do some work}
I was wondering if it would be possible to extend this functionality to work with a more declarative approach, similar to what I have mentioned with the [RelayCommand(showProgress: true)] pattern.
Could you share insights on whether this is feasible, or if there are existing workarounds for customizing the behavior of the [RelayCommand] attribute through source generators?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I’m working on a task related to updating the
[RelayCommand]
attribute, and I wanted to inquire about the possibility of overriding the source generators when using this attribute in the CommunityToolkit.Mvvm library.Specifically, I’m considering a scenario where the
showProgress
functionality could be controlled directly via the attribute, such as:The main focus of this work item is to explore whether we can extend or modify the behavior of the
[RelayCommand]
attribute using parameters likeshowProgress
without needing to manually manage it in each command.Currently, I use the following approach, which accomplishes my desired behaviour using MVVM, without
[RelayCommand]
attribute .I was wondering if it would be possible to extend this functionality to work with a more declarative approach, similar to what I have mentioned with the
[RelayCommand(showProgress: true)]
pattern.Could you share insights on whether this is feasible, or if there are existing workarounds for customizing the behavior of the
[RelayCommand]
attribute through source generators?Beta Was this translation helpful? Give feedback.
All reactions