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 have a use-case where I have a view model that contains an ICommand for refresh. I bind this to the RefreshCommand of the PullToRefreshLayout. Fine.
However, I also want to use an EventToCommandBehavior to bind the refresh command to the Appearing event. But, on appearing I want the refresh command to pull from cache (if present) and the "pull to refresh" behavior to force a cache refresh. This is because the cached data can be modified from elsewhere in the app, and upon returning to the view we want to see the latest data without forcing the user to "pull to refresh".
Both of these variations were implemented in the ICommand instance, but I'd need to specify whether to support cache to the command instance. The most desirable way would be to do this via a RefreshCommandParameter argument. In the Appearing event I would do:
The trouble is, there is no RefreshCommandParameter.
Instead, my view model is forced to have 2 different ICommand properties, one for the Appearing event's EventToCommandBehavior.Command and another for the PullToRefreshLayout.RefreshCommand.
Please add a RefreshCommandParameter in order to have consistency with other controls that support commands.
I have a use-case where I have a view model that contains an ICommand for refresh. I bind this to the RefreshCommand of the PullToRefreshLayout. Fine.
However, I also want to use an EventToCommandBehavior to bind the refresh command to the Appearing event. But, on appearing I want the refresh command to pull from cache (if present) and the "pull to refresh" behavior to force a cache refresh. This is because the cached data can be modified from elsewhere in the app, and upon returning to the view we want to see the latest data without forcing the user to "pull to refresh".
Both of these variations were implemented in the ICommand instance, but I'd need to specify whether to support cache to the command instance. The most desirable way would be to do this via a RefreshCommandParameter argument. In the Appearing event I would do:
and in the PullToRefreshLayout would be like this:
The trouble is, there is no RefreshCommandParameter.
Instead, my view model is forced to have 2 different ICommand properties, one for the Appearing event's EventToCommandBehavior.Command and another for the PullToRefreshLayout.RefreshCommand.
Please add a RefreshCommandParameter in order to have consistency with other controls that support commands.
P.S. While at it, it would be really nice if this was added to the out of the box ListView. That is a topic for somewhere else, but I'd be nice for this plugin not to make the same mistake in omitting it... https://forums.xamarin.com/discussion/37899/listview-pulltorefresh-doesnt-have-refreshcommandparameter-how-i-got-around-it
The text was updated successfully, but these errors were encountered: