-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] BindingContext default behavior, on nested controls #10296
Comments
I am not sure if this should work or not but you can always use relative bindings in that case |
@SarthakGz for this workaround, It works! Text="{Binding Source={RelativeSource AncestorType={x:Type vm:SignInViewModel}}, Path=Email, Mode=TwoWay}"/> Maybe this one needs attention, Is it the correct default behavior? PS: I know that I can Bind a color to a Shadow witout Relative Binding, so why do I have to do this with my nested input?
|
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. |
Hello,
What should be the default BindingContext?
*This two are really interesting, and depends if you works on MVVM or not. I just wanted to know which way should I take, to make less refactoring at the end. |
This is kind a Sucks, The Intel sense does show the properties for nested controls and binds without any issue but doesn't work when app launches, On Most Cases We need to use RelativeSource or Reference Markup Extensions to Get Most of it work on Nested Controls with Compiled Bindings with Single Data Context |
Description
Hello,
I am trying to bind a Text Property of a control that is inside another, and it does not work.
Let me explain, I was creating kind of an Input layout, like so
We should be able to use it like this, But the binding on the Entry does not work anymore...
I also tried to create a intermediate Bindable Text Property in my InputLayout, then bind it progamaticaly, but it also doesn not work.
Hope you get it :)
Steps to Reproduce
Link to public reproduction project repository
Does my sample code is enough? Let me know, Regards
Version with bug
6.0.486 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android, Windows, macOS
Affected platform versions
iOS 16, Mac, Android 12
Did you find any workaround?
You will need to provide a relative Source to make it works.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: