Bug 42205 - The UI doesn't listen to propertyChanged of FormattedText
Summary: The UI doesn't listen to propertyChanged of FormattedText
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-06-28 13:25 UTC by François M
Modified: 2017-03-01 20:44 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description François M 2016-06-28 13:25:37 UTC
Not sure if this is a bug, but FormattedText doesn't behave as I thought it would.
Changing its value through binding has no effect on screen.
see: http://stackoverflow.com/questions/38077346/xamarin-forms-the-ui-doesnt-listen-to-propertychanged-of-formattedtext
Comment 1 adrianknight89 2016-10-17 23:06:16 UTC
When you set any bindings by calling SetBinding(), you also need to make sure your model implements INotifyPropertyChanged. I suspect that you're not doing this. You could also use Fody since it's simpler.

Verify that property change notification on your data source fixes the issue. If not, this could be investigated further.
Comment 2 François M 2016-10-18 06:32:39 UTC

Thank you for your answer.

I should not have talked about binding. It's not a binding issue. I, of course, implement INotifyPropertyChanged (and use Fody btw). SetBinding on FormattedTextProperty does work.

The issue is about directly setting FormattedText within OnPorpertyChanged of a Label. You can check my initial link as I show code there.

When I set FormattedText, it has no effect on the UI. In order to see changes in the UI, I first change the value of Text then change the value of FormattedText.
Comment 3 adrianknight89 2016-11-04 20:24:50 UTC
I'm still having difficulty reproducing this. I tested the code on StackOverflow. Can you attach a minimal repro? Use 2.3.3-pre4.