Bug 29826 - InputTransparent fails if BackgroundColor not explicitly set on Windows Phone
Summary: InputTransparent fails if BackgroundColor not explicitly set on Windows Phone
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.3
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-05-07 07:13 UTC by John Hardman
Modified: 2016-12-01 07:05 UTC (History)
7 users (show)

Tags: WinPhone InputTransparent BackgroundColor Scrolling
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 ANSWERED

Description John Hardman 2015-05-07 07:13:20 UTC
It seems that there is an interaction between BackgroundColor and InputTransparent on WindowsPhone. Using the code below, if the user tries scrolling up or down by touching the one-unit high separator lines, the scrolling does NOT happen on Windows Phone (I am using a physical Nokia device). However, uncomment the lines that set BackgroundColor, and suddenly scrolling does work. A very weird interaction - setting BackgroundColor should not impact InputTransparent.

I am using:
"WPtoolkit" version="4.2013.08.16" targetFramework="wp80"
"Xamarin.Forms" version="1.4.3.6358-pre2" targetFramework="wp80"




using Xamarin.Forms;

namespace XamarinBug_BoxViewInputTransparent
{
    public class App : Application
    {
        public App()
        {
            // The root page of your application
            MainPage = new ContentPage
            {
                Content = new ScrollView
                {
                    Orientation = ScrollOrientation.Vertical,
                    Content = new StackLayout
                    {
                        InputTransparent = true,
                        Orientation = StackOrientation.Vertical,
                        Padding = Device.OnPlatform(new Thickness(5, 20, 5, 5), new Thickness(5, 0, 5, 5), new Thickness(5, 0, 5, 5)),
                        Spacing = 0.0,
                        VerticalOptions = LayoutOptions.Fill,
                        Children = 
                        {
                            new Label
                            {
                                FontAttributes = FontAttributes.Bold,
                                FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                                LineBreakMode = LineBreakMode.WordWrap,
                                Text = "Some text here to give some space between the separators.",
                                TextColor = Color.Accent,
                                YAlign = TextAlignment.Center
                            },
                            new StackLayout
                            {
//                                BackgroundColor = Color.White,
                                InputTransparent = true,
                                Orientation = StackOrientation.Vertical,
                                Padding = new Thickness(0, 40, 0, 40),
                                Children =
                                {
                                    new BoxView
                                    {
                                        Color = Color.Accent,
                                        HeightRequest = 1,
                                        HorizontalOptions = LayoutOptions.FillAndExpand,
                                        InputTransparent = true,
                                        VerticalOptions = LayoutOptions.Center
                                    }                                    
                                }
                            },
                            new Label
                            {
                                FontAttributes = FontAttributes.Bold,
                                FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                                LineBreakMode = LineBreakMode.WordWrap,
                                Text = "Some text here to give some space between the separators.",
                                TextColor = Color.Accent,
                                YAlign = TextAlignment.Center
                            },
                            new StackLayout
                            {
//                                BackgroundColor = Color.Gray,
                                InputTransparent = true,
                                Orientation = StackOrientation.Vertical,
                                Padding = new Thickness(0, 40, 0, 40),
                                Children =
                                {
                                    new BoxView
                                    {
                                        Color = Color.Accent,
                                        HeightRequest = 1,
                                        HorizontalOptions = LayoutOptions.FillAndExpand,
                                        InputTransparent = true,
                                        VerticalOptions = LayoutOptions.Center
                                    }                                    
                                }
                            },
                            new Label
                            {
                                FontAttributes = FontAttributes.Bold,
                                FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                                LineBreakMode = LineBreakMode.WordWrap,
                                Text = "Some text here to give some space between the separators.",
                                TextColor = Color.Accent,
                                YAlign = TextAlignment.Center
                            },
                            new StackLayout
                            {
//                                BackgroundColor = Color.White,
                                InputTransparent = true,
                                Orientation = StackOrientation.Vertical,
                                Padding = new Thickness(0, 40, 0, 40),
                                Children =
                                {
                                    new BoxView
                                    {
                                        Color = Color.Accent,
                                        HeightRequest = 1,
                                        HorizontalOptions = LayoutOptions.FillAndExpand,
                                        InputTransparent = true,
                                        VerticalOptions = LayoutOptions.Center
                                    }                                    
                                }
                            },
                            new StackLayout
                            {
//                                BackgroundColor = Color.Gray,
                                InputTransparent = true,
                                Orientation = StackOrientation.Vertical,
                                Padding = new Thickness(0, 40, 0, 40),
                                Children =
                                {
                                    new BoxView
                                    {
                                        Color = Color.Accent,
                                        HeightRequest = 700,
                                        HorizontalOptions = LayoutOptions.FillAndExpand,
                                        InputTransparent = true,
                                        VerticalOptions = LayoutOptions.Center
                                    }                       
                                }
                            }
                        }
                    }
                }
            };
        }

        protected override void OnStart()
        {
            // Handle when your app starts
        }

        protected override void OnSleep()
        {
            // Handle when your app sleeps
        }

        protected override void OnResume()
        {
            // Handle when your app resumes
        }
    }
}
Comment 1 Ram Chandra 2015-05-07 13:46:20 UTC
I have checked this issue with the test case mentioned in bug description but I am unable to reproduce this issue. 

I have tried that same test case with device and emulator and I observed that I am able to scroll the view with commenting and uncommenting the line that set background color.

Screencast: http://www.screencast.com/t/oVK9wCLE

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

You can get build info from here:

Visual Studio =>  HELP => About Microsoft Visual Studio => Copy Info

Environment Info:

Xamarin.Forms:  1.4.3.6358-pre2

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Professional

LightSwitch for Visual Studio 2013   06177-004-0447006-02641
Microsoft LightSwitch for Visual Studio 2013

Team Explorer for Visual Studio 2013   06177-004-0447006-02641
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06177-004-0447006-02641
Microsoft Visual Basic 2013

Visual C# 2013   06177-004-0447006-02641
Microsoft Visual C# 2013

Visual C++ 2013   06177-004-0447006-02641
Microsoft Visual C++ 2013

Visual F# 2013   06177-004-0447006-02641
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06177-004-0447006-02641
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Windows Phone SDK 8.0 - ENU   06177-004-0447006-02641
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   12.3.50717.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Microsoft Azure Websites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure

ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.20703.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.2
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Microsoft Advertising SDK for Windows Phone   
Microsoft Advertising SDK for Windows Phone
Build 

Microsoft Azure Mobile Services Tools   1.2
Microsoft Azure Mobile Services Tools

Multilingual App Toolkit   3.1.1250.0
Multilingual App Toolkit helps you localize your Windows Store app by providing file management, pseudo and machine translation, translation editor, and build integration. http://go.microsoft.com/fwlink?linkid=245767

NuGet Package Manager   2.8.50926.663
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Office Developer Tools for Visual Studio 2013 ENU   12.0.30626
Microsoft Office Developer Tools for Visual Studio 2013 ENU

PowerShell Tools   1.2
Provides file classification services using PowerShell

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   12.0.30919.1
Microsoft SQL Server Data Tools

Windows Phone 8.1 SDK Integration   1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   3.11.538.0 (36db3f6)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   5.1.1.0 (2fff837db393f75c4a7a32f5963918dd6168b015)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.Forms Intellisense   1.0
Provides intellisense for Xamarin.Forms in the XML editor.

Xamarin.iOS   8.10.1.0 (d8da1911bd2f0f1327a80560a7f286e6e221b0af)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified

Xamarin.TestCloud.Integration   1.0
Early preview of Xamarin Test Cloud integration
Comment 3 John Hardman 2015-05-19 10:44:04 UTC
Here's the build information:

Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.51650

Installed Version: Professional

LightSwitch for Visual Studio 2013   06177-004-0446034-02134
Microsoft LightSwitch for Visual Studio 2013

Team Explorer for Visual Studio 2013   06177-004-0446034-02134
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06177-004-0446034-02134
Microsoft Visual Basic 2013

Visual C# 2013   06177-004-0446034-02134
Microsoft Visual C# 2013

Visual C++ 2013   06177-004-0446034-02134
Microsoft Visual C++ 2013

Visual F# 2013   06177-004-0446034-02134
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06177-004-0446034-02134
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Windows Phone SDK 8.0 - ENU   06177-004-0446034-02134
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   12.4.51016.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Microsoft Azure Websites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure

ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.21010.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.3
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

InstallShield Limited Edition   
InstallShield. For more information visit the Flexera Software website at <http://www.FlexeraSoftware.com>. Copyright © 2013 Flexera Software LLC. All Rights Reserved.

JetBrains ReSharper Platform 6   Build 6.0.20141204.190160 on 2014-12-04 19:29:31Z
JetBrains ReSharper Platform package for Microsoft Visual Studio. For more information about ReSharper Platform, visit http://www.jetbrains.com/resharper. Copyright © 2015 JetBrains, Inc.

Microsoft Advertising SDK for Windows Phone   
Microsoft Advertising SDK for Windows Phone
Build 

Microsoft Azure HDInsight HQL Service   2.0.1000.0
Language service for Hive query

Microsoft Azure HDInsight Tools for Visual Studio   2.0.1000.0
An integrated development environment for HDInsight application development.

Microsoft Azure Mobile Services Tools   1.3
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools   2.5
Microsoft Azure Tools for Microsoft Visual Studio 2013 - v2.5.21104.1601

NuGet Package Manager   2.8.60318.734
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Office Developer Tools for Visual Studio 2013 ENU   12.0.31105
Microsoft Office Developer Tools for Visual Studio 2013 ENU

PowerShell Tools   1.3
Provides file classification services using PowerShell

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SAPReferenceManager   1.0
Manages References to Shared Projects

SQL Server Data Tools   12.0.41025.0
Microsoft SQL Server Data Tools

Team Foundation Sidekicks   3.0
Team Foundation Sidekicks utilities

Windows Azure Tools   2.2
Windows Azure Tools for Microsoft Visual Studio 2013 - v2.2.11003.1601

Windows Phone 8.1 SDK Integration   1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   3.11.445.0 (5061f92)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   5.1.0.115 (d23da369e436488f38c8ab8fe8a9ae7d9ea5256b)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.Forms Intellisense   1.0
Provides intellisense for Xamarin.Forms in the XML editor.

Xamarin.iOS   8.10.0.0 (7741cc495ab0baf04ff0405d0604bc27f0ecae2e)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified
Comment 5 John Hardman 2015-05-23 09:31:33 UTC
I have just found that the same occurs with StackLayout on WinPhone. If the BackgroundColor is Color.Default and InputTransparent is set to true, the input is handled correctly. As soon as the BackgroundColor is changed to something other than Color.Default, the behaviour is as expected.
Comment 6 John Hardman 2015-06-08 04:27:04 UTC
Set back to NEW as per a comment in the forums saying that when responding to NEEDINFO to change the state to NEW again.
Comment 7 Ram Chandra 2015-07-01 10:15:07 UTC
@Jhon Hardman: Thanks for the test case.

I have checked this issue and I am able to reproduce this issue.  I observed that I am only getting this issue when I set the BackgroundColor property to Color. Default and InputTransparent is set to true.

IDE logs: https://gist.github.com/Parmendrak/80c0a902cb65298a7860

Note: I am not getting this issue with android.

Environment Info:

Xamarin.Forms: 1.4.3.6374

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641
Installed Version: Professional
Xamarin   3.11.666.0 (ebae43a)
Xamarin.Android   5.1.4.16 (5f55a9ef61c11b6ce0890bc91e4c71b1b92be214)
Xamarin.iOS   8.10.2.0 (67b390d0d1bd741582cf7b7fd3ffea08583a3f83)
Comment 8 Paul DiPietro [MSFT] 2016-12-01 07:05:40 UTC
Setting this to closed as it appears to be about WP8 (which is no longer a part of the default Forms template) and for reasons which are probably somewhat similar to why a fix for 40514 was closed with regards to how Windows handles color and InputTransparent.