Inability to create a custom binding from scratch #16760
YohDeadfall
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Prior v11 it was possible to create a totally custom binding which I used in my own project for things like:
The code above was able to create a binding listening to
DataContext
changes, trying to cast its value toParent
and then accessingText
property of an object stored insideParent
'sChild
property.Is it possible to implement the same thing now? I though about supporting XAML compiled bindings for my project, but I cannot get how to do that without the ability of making a totally custom binding.
I can add an extension method to
AvaloniaObject
to make code first binding creation easier for instances, but again, it won't work for styles and templates where the source is taken from the target object. XAMLIL perhaps uses the internalIBinding2
or abuses the private member access in any other way, but I don't want to play with IL and instead I want to generate C# code for bindings instead while feeding back to the Avalonia build task altered XAML files where all Kinetic bindings are replaced by the generated markup extensions producing a binding expression or something like it.Beta Was this translation helpful? Give feedback.
All reactions