Replies: 2 comments 8 replies
-
I was faced with a similar issue recently and found some good advice given in this thread: #16787 Basically you wrap the binding in a MultiBinding and then use a converter to transform the binding into the value that you want. |
Beta Was this translation helpful? Give feedback.
-
I wouldn't use https://github.com/AvaloniaUtils/AsyncImageLoader.Avalonia The That said, if you're simply trying to get a binding here: // How can I get an Observable of my binding value?
private readonly IObservable<string> _imageUri; You can call Regarding converters: they're really bad for async operations. This is why I say to not use |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to build a Markup Extension that can be used as an in memory image cache.
I'd like to be able to bind to the resource and get a stream binding back that's either a completed task with the
IImage
or a running task.I'd like to bind to an image path (as an IObservable) in XAML and use a markup extension to cache the result.
I can't figure out how to pass the ViewModels ImagePath property to the Markup Extension as an IObservable. The old binding API allowed passing it as a BindingBase. A call to Initiate(..) returned an InstancedBinding which had the Observable as the Source property.
What's the proper way of doing this now?
Beta Was this translation helpful? Give feedback.
All reactions