Open elTRexx opened 1 month ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Hi @elTRexx. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
Just uploaded and linked in OP description my testing project to github. (https://github.com/elTRexx/TestingDeepRefresh)
I can repro this issue at window platform on the latest 17.11.0 Preview 7.0( 8.0.80 & 8.0.71 & 8.0.60).
Description
As explained in this SO post, I have 2
CollectionViews
in my testing project 1) Standard one binded to anObservableCollection
of mocked viewmodel class encapsulating a simple observable string property 2) Another (just for testing purpose originally, not mvvm pattern) to reflect directly visually the change made to my model by the first one. In order to update the UI on inner child class property modification I use a customObservableCollection
, namedDeepObservableCollection
(from this SO post). And to properly display any model item in this UI secondCollectionViews
, I use aIValueConverter
that will grab the inner child class string property and return it.The first one use
Entry
to edit the string on UI. I then binded a returnCommand on this entries to update associated model string value and performed the necessary binding to reflect it on the second one (theDeepObservableCollection
).The Bug is that editing the first entry of my first
CollectionViews
is never reflected back visually on the secondCollectionViews
(but via debuggingTrace.Writeline
I can assert the model has been updated as required). For other following entry no issue so far.Diving into this, I found out that the associated converter, strangely (bug), is call 2 times on each entry except the first one who is never called (explaining why the modified model string value is not reflect back in UI).
The whole main code are in my SO post,
EDIT
but if you need it i can upload my solution to github if it facilitate it.Here is my testing project uploaded to githubSteps to Reproduce
CollectionView
following by a Return command (Return keyboard press)CollectionView
StringPOCOToStringConverter.Convert
method, and note for witchvalue
argument it is called when updating the secondObservableCollection
child class property.Link to public reproduction project repository
https://github.com/elTRexx/TestingDeepRefresh
Version with bug
9.0.61 SR6.1
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
10.0.19041.0
Did you find any workaround?
Instead of Binding to the parent class items and use converter on them, Binding to the child class instead (and changing converter accordingly) make it work on each entry (thanks to the answer I got on my SO post).
Relevant log output