Bug 25547 - Implicit styles don't apply to TextCell inside a DataTemplate
Summary: Implicit styles don't apply to TextCell inside a DataTemplate
Status: RESOLVED DUPLICATE of bug 46503
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-12-20 12:06 UTC by luca.barbieri
Modified: 2017-06-19 15:20 UTC (History)
7 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 luca.barbieri 2014-12-20 12:06:55 UTC
TextCells defined in a DataTemplate don't respect implicit styles set in an application resources dictionary.

I believe the issue is that content instantiated from a DataTemplate is probably not inheriting parent resources somehow.

To reproduce, add a style like this to the Application.Resources dictionary:
<Style TargetType="TextCell">
	<Setter Property="TextColor" Value="Green" />

And add a ListView with a DataTemplate containing a TextCell to an application's page.
Comment 1 Parmendra Kumar 2014-12-23 07:12:40 UTC
I have tried to reproduce this issue but I am not able to reproduce this. Could you please provide us a sample project and environment info that can be helpful to reproduce at my end.
Comment 2 Lee Olsen 2015-04-11 20:40:17 UTC
			<Style TargetType="TextCell">
				<Setter Property="TextColor"
					    Value="Red" />
		<ListView ItemsSource="{Binding Collection}">
					<TextCell Text="{Binding }"/>

Collection is an ObservableCollection<string>.

TextCell inherits from Cell which inherits from Element. StyleProperty is defined in VisualElement so TextCell doesn't have a style property. You can't explicitly or implicitly define a style for any of the Cell types. Would like to see this changed as well.
Comment 3 Jason Smith [MSFT] 2016-03-25 19:14:16 UTC
Thank you for taking the time to submit this report. After reviewing the description of this bug, we no longer believe it affects the current version of Xamarin.Forms. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.
For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d

Warm regards,
Xamarin Forms Team
Comment 4 E.Z. Hart [MSFT] 2017-06-19 15:20:54 UTC

*** This bug has been marked as a duplicate of bug 46503 ***