Open bakerhillpins opened 1 year ago
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
Verified this issue with Visual Studio Enterprise 17.7.0 Preview 2.0. Can repro on Android and iOS platform with sample project. https://github.com/bakerhillpins/Issues/tree/NetMauiIssue12469 Windows: Android:
I've applied the fix described and confirmed it works
Description
The only way you can get
RefreshView.IsRefreshing
to work in a binding scenario is to use a TwoWay binding. Therefore one can't create a UX where the Swipe feature executes the command and the feedback from the completion of the command clears the bit false. Simple one way round tripping the process. The design forces one to have a Read/Write property to interface withRefreshView.IsRefreshing
. This is unfortunate as it doesn't work with Async MVVM programming paradigms which are applied to Commanding. These designs/patterns are built around completion notification via read only properties.The reason this happens is because the
RefreshView
control code manipulates theRefreshView.IsRefreshing
property as an external user would, through it's Getter/Setter. This updates theBindableProperty
usingBindableObject.SetValue
which results in clearing OneWay bindings when a Manual Set occurs. Thus the UX fails. The Control code should really be using the public methodBindableObject.SetValueCore
where it can set the value but not cancel the OneWay Binding. This would require the control code to use an internal interface exposing access toSetValueCore
within the handler code rather than the publicIRefreshView
which only exposes the Public property.Steps to Reproduce
Clone example repo. Select Issue 12469 Pull down and note the Busy Indicator never completes. Switch to the TwoWay code and note it does complete.
Link to public reproduction project repository
https://github.com/bakerhillpins/Issues/tree/NetMauiIssue12469
Version with bug
6.0 Release Candidate 2 or older
Last version that worked well
6.0 Release Candidate 2 or older
Affected platforms
iOS, Android, Windows, macOS, I was not able test on other platforms
Affected platform versions
All
Did you find any workaround?
Workaround
Create a TwoWay binding and let the binding engine constantly complain about not being able to bind to the Property Setter. Write some extra code to wrap the Read Only property so that it looks like a Read Write property.
Relevant log output
No response