Bug 23833 - TextCell backgrounds in TableView don't update from Binding
Summary: TextCell backgrounds in TableView don't update from Binding
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.0
Hardware: Other Other
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-10-15 02:24 UTC by Bryan Klimt
Modified: 2014-10-23 02:50 UTC (History)
4 users (show)

Tags:
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:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Bryan Klimt 2014-10-15 02:24:12 UTC
To repro:

1. Create a TableView with a binding for the background color:

            <TableView Intent="Menu" BackgroundColor="{Binding Theme.Background}">
                <TableSection Title="A Title">
                    <TextCell Text="A Menu Item" />
                </TableSection>
            </TableView>

2. Change the value of the bound property from code after the TableView has rendered:

            rootViewModel.Theme = new Theme() { Background = Color.Black; };

Expected: The background of the cells in the table should now be black.
Actual: The background of the cells in the table is still white (or whatever the original property value is).

Platforms tested: iOS 8

It's only a problem for the BackgroundColor. If I set the TextColor on the TextCells as a bound property, they update correctly. I've observed similar behavior from ListViews, but that can be worked around by repopulating the ListView. However, TableViews are supposed to host static content, so it's not such an easy workaround.
Comment 1 Sadik Ali 2014-10-16 08:03:24 UTC
I have checked this issue but I am unable to reproduce this issue.

Could you please provide sample application and build information? So that we can reproduce this issue at our end.

You can get build information from here:

Xamarin Studio => About Xamarin Studio => Show Details => Copy Information.
Comment 2 Bryan Klimt 2014-10-23 02:50:18 UTC
Even though it repros reliably in my large project, I was unable to repro in a minimal project. I'll reopen if I figure out the trick to making a minimal repro sample. Sorry for the noise.