Bug 56696 - Property changes don't propagate through two levels of bindings
Summary: Property changes don't propagate through two levels of bindings
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-05-20 03:02 UTC by Edward Brey
Modified: 2017-07-12 22:48 UTC (History)
2 users (show)

Tags: ac ios android uwp bindings bindableproperty
Is this bug a regression?: ---
Last known good build:

Repro (1.37 KB, text/plain)
2017-05-22 17:43 UTC, Edward Brey
repro project (51.53 KB, application/zip)
2017-05-23 17:52 UTC, Jimmy [MSFT]

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 56696 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Edward Brey 2017-05-20 03:02:45 UTC
Suppose you create a class WrapperView derived from ContentView whose Content is a Label and that has a bindable property StuffToShow, and with this in its constructor:

label.SetBinding(Label.TextProperty, "StuffToShow");

If you use WrapperView in a page like this, it works fine:

<local:WrapperView StuffToShow="Hello world!" />

However, if you replace the above with a valid binding such as this, it doesn't work:

<local:WrapperView StuffToShow="{Binding GoodByeWorldText}" />
Comment 1 Jimmy [MSFT] 2017-05-22 17:15:28 UTC
Hi Edward, thank you for filing this report! I used the code you provided to build a new project, but I'm not sure I am seeing the issue you described. Could you attach a minimal project that reproduces the issue so I can verify?

After attaching the project, please set the report's status back to NEW otherwise we may close this issue after 30 days of no response. Thank you!
Comment 2 Edward Brey 2017-05-22 17:43:22 UTC
Created attachment 22362 [details]

To repro, create a default Xamarin Forms project and replace MainPage.xaml.cs with the attached file. The expected result is:

    From view model
    From view model
    Not from view model

However, when you run it on UWP (and other platforms too?), you get:

    From view model

    Not from view model
Comment 3 Edward Brey 2017-05-22 17:45:49 UTC
Info provided
Comment 4 Jimmy [MSFT] 2017-05-23 17:52:37 UTC
Created attachment 22394 [details]
repro project

Thank you for that! I am seeing the issue you described. However I am not sure if this is a bug or something that's not currently supported, but I will still confirm this report so the team can investigate further.

### Steps to Reproduce
1. Run the attached project

### Expected Results
You will the following Labels:

> From view model
> From view model
> Not from view model

### Actual Results
You see the following:

> From view model
> Not from view model

### Version Tests