Bug 21524 - SwitchCell used as a TableView cell in second TableSection is additionally rendered in header of first section. (Android only)
Summary: SwitchCell used as a TableView cell in second TableSection is additionally re...
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.2
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-07-22 16:37 UTC by Jon Goldberger [MSFT]
Modified: 2016-03-15 19:29 UTC (History)
5 users (show)

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

Test Project (2.91 MB, application/zip)
2014-07-22 16:37 UTC, Jon Goldberger [MSFT]
output (98.19 KB, image/png)
2014-09-10 13:14 UTC, Andrew

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 Jon Goldberger [MSFT] 2014-07-22 16:37:50 UTC
Created attachment 7459 [details]
Test Project

This issue only occurs on Android, it seems to work correctly on iOS. 

To reproduce:

1. Open attached test project.
2. Set Android app as startup app.
3. Open App.cs file in FormsTestTableViewXaml PCL project
4. Launch app on device/emulator

Expected result: A TableView will appear with two sections, a Notifications section and a Network section. There should be no controls in the section headers.
Actual result: A Switch is rendered in the Notifications section header. This SwitchCell is set as a ViewCell for the Network section and is rendered there as well. 

To prove the above:
1. Open the TableView2.xaml file.
2. Comment out the 4 SwitchCell elements in lines 50-53
3. Relaunch the app.

Expected Result: No switch control will be displayed in Notification section header
Actual result: as expected.
Comment 2 Jon Goldberger [MSFT] 2014-07-22 18:50:06 UTC
Note that the same issue occurs if I build the same tableView in code.

Gist: https://gist.github.com/jgold6/a0463fc99da069a0efcf
Comment 3 Eric Maupin 2014-07-22 19:40:30 UTC
This should be fixed in 1.2.2
Comment 4 Jon Goldberger [MSFT] 2014-07-22 19:53:57 UTC
I tested with and that is the version that is in the attached test project.
Comment 5 Andrew 2014-09-10 13:13:57 UTC
this will fail:  (output attached).  Android, Genymotion.

Xamarin Studio
Version 5.3 (build 441)
Installation UUID: d7e8dd47-4284-4bcf-842a-76d435549b7d
	Microsoft .NET 4.0.30319.18444
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26

public MyTablePage ()
	var t = new TableView {
		Root = new TableRoot {
			new TableSection(" ")
				new SwitchCell
					On = true
			new TableSection("")
				new TextCell { Text = "Section2" }

	this.Content = new StackLayout {
		Children = {
Comment 6 Andrew 2014-09-10 13:14:21 UTC
Created attachment 7987 [details]
Comment 8 Jason Smith [MSFT] 2016-03-15 19:29:38 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