-
Notifications
You must be signed in to change notification settings - Fork 693
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
Proposal: Allow binding scopes in x:Bind #2237
Comments
This seems like it would require a fundamental difference in design for How do you propose we enable this to happen? |
Haven't thought about syntax, but it feels like some kind of a let clause scenario. |
As the user sees things, Now we want to add a mode where it does bind to I'm all for this, just not sure how to rationalize it in a way that doesn't cause things to blow up in complexity |
Propagating DataContext down the tree is quite expensive. If we can selectively propagate and scope down the tree explicitly using x:Bind, that would be great. In this specific scenario would x:Bind ViewModel.Phones work ? |
🦙 This is related to #2508 as well I think? |
Hi,
I used to set the
DataContext
to deeper scopes whenever necessary, so I can use shorter binding expressions: (ViewModel
is of typeContactViewModel
, that exposes aPhones
collection property):I'm trying to use the above with
x:Bind
as follows, but seems thatx:Bind
would always bind against the page, not the currentDataContext
scope, which can lead to very verbose expressions.My suggestion is that you allow scoping of
x:Bind
as well.But I get the following error:
Cross posted from here.
The text was updated successfully, but these errors were encountered: