AutoCompleteBox.InnerLeftContent is not updating on view model changes #15544
-
I have an When I begin typing in the text box, the items appear as expected. If I navigate the items with the keyboard, the selection in the model changes, the value in the text box changes, the Here's a repo with a minimal reproduction of the behavior. Am I binding the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
You can try to explicitly set BindingMode as TwoWay |
Beta Was this translation helpful? Give feedback.
-
That did not do the trick. I simply don't understand why the SVG binding on the far right updates but the binding on the |
Beta Was this translation helpful? Give feedback.
-
I could be completely off here due to hardly any knowledge of how the Avalonia architecture decides what needs to be redrawn, but given the visual tree:
The SvgImage class
but that's not what is being changed, the underlying source of |
Beta Was this translation helpful? Give feedback.
Looks like you are right, SvgImage has even a comment here to invalidate IImage https://github.com/wieslawsoltes/Svg.Skia/blob/f987aafd8f78d5558e089cb9aea5552b6abd47ff/src/Avalonia.Svg/SvgImage.cs#L103
But it looks like IImage is not designed to be mutable:
Avalonia/src/Avalonia.Base/Media/IImage.cs
Line 8 in 3a1a69b
What you should do then, is to bind the Category directly to Image.SourceProperty and modify the converter to return an instance of SvgImage with the new value set as the source in SvgImage.