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.
Steps to reproduce: 1. Add a button to a page, set IsVisible property to false 2. Build and run on a WP8.0 device or emulator 3. Tap the top of the screen as shown in the attached screenshot Actual results: Button event fires as if the button is visible, even though it is not shown on screen. Click gesture does not reach any elements under the invisible one (eg. the list item in the sample) Expected results: Buttons where IsVisible=false should be invisible, not be able to be clicked, and should not impede interaction with visible page elements (eg. First list item in the attached sample). -- Tested against Android and Windows Phone 8.0, only seems to occur on Windows Phone. See attached project for a sample, and see attached screenshot to illustrate where to click to fire the invisible button event. Environment details: Microsoft Visual Studio Professional 2013 Version 12.0.30501.00 Update 2 Microsoft .NET Framework Version 4.5.51641 Installed Version: Professional LightSwitch for Visual Studio 2013 06177-004-0444002-02230 Microsoft LightSwitch for Visual Studio 2013 Office Developer Tools - May 2014 Update ENU 06177-004-0444002-02230 Microsoft Office Developer Tools for Visual Studio 2013 - May 2014 Update ENU Team Explorer for Visual Studio 2013 06177-004-0444002-02230 Microsoft Team Explorer for Visual Studio 2013 Visual Basic 2013 06177-004-0444002-02230 Microsoft Visual Basic 2013 Visual C# 2013 06177-004-0444002-02230 Microsoft Visual C# 2013 Visual C++ 2013 06177-004-0444002-02230 Microsoft Visual C++ 2013 Visual F# 2013 06177-004-0444002-02230 Microsoft Visual F# 2013 Visual Studio 2013 Code Analysis Spell Checker 06177-004-0444002-02230 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-0444002-02230 Windows Phone SDK 8.0 - ENU ASP.NET and Web Tools 2013.2.50425 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 Windows Azure Web Sites Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Windows 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.1.20409.0 For additional information, visit http://www.asp.net/ Common Azure Tools 1.1 Provides common services for use by Azure Mobile Services and Windows Azure Tools. Microsoft Advertising SDK for Windows Phone Microsoft Advertising SDK for Windows Phone Build NuGet Package Manager 2.8.50313.46 NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/. 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 Azure Mobile Services Tools 1.1 Windows Azure Mobile Services 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.3.47.0 (0b2a123923812a88ed3091909478dbe9e0111f00) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android
Created attachment 7786 [details] Sample project Add Xamarin.Forms via Nuget and compile
Created attachment 7787 [details] Screenshot - tap at the top of the screen Run the attached project and tap at the top of the screen as shown in this screenshot
Sorry, should have also mentioned that I have tried this both in XAML and code, with the same effect.
I have confirmed this. Thank you for the concise reproduction!
I was just going to create a new bug when I spotted this one. It only occurs on Windows Phone. Bizarre I know. I created an new XF shared project and replaced the App.cs GetMainPage() code with this code. Note that the btnMinus is set to IsVisible false yet when clicking the btnPlus it is actually btnMinus.Clicked code that is triggered. My real scenario is that I want to show a Next button at the end of a game, but whilst this button is hidden the other buttons aren't working properly!! Thanks Russell public static Page GetMainPage() { int iCount = 0; Label clicks = new Label { Text = "0", Font = Font.SystemFontOfSize(50), VerticalOptions = LayoutOptions.CenterAndExpand, HorizontalOptions = LayoutOptions.CenterAndExpand, }; Button btnPlus = new Button { Text = "Plus" }; btnPlus.Clicked += ((s, e) => { iCount++; clicks.Text = iCount.ToString(); }); Button btnMinus = new Button { Text = "Minus" }; btnMinus.Clicked += ((s, e) => { iCount--; clicks.Text = iCount.ToString(); }); btnMinus.IsVisible = false; return new ContentPage { Content = new StackLayout { Orientation = StackOrientation.Vertical, VerticalOptions = LayoutOptions.CenterAndExpand, HorizontalOptions = LayoutOptions.CenterAndExpand, Children = { clicks, new StackLayout { Orientation = StackOrientation.Horizontal, VerticalOptions = LayoutOptions.CenterAndExpand, HorizontalOptions = LayoutOptions.CenterAndExpand, Children = { btnPlus, btnMinus}, } }, }, }; }
Thanks, it will be fixed in the next version 1.3.2
I have checked this issue with following builds: Xamarin.Forms.1.3.2.6299-pre1 Microsoft Visual Studio Professional 2013 Version 12.0.30723.00 Update 3 Microsoft .NET Framework Version 4.5.51641 Installed Version: Professional Xamarin 3.9.236.0 (d6a2cae) Xamarin.Android 4.20.0.34 (49a04b966feb40dfdba49d57ba16249b66d606a6) Xamarin.iOS 8.6.0.0 (eb24bdcf5cba2c12b673a07e0a8cce368b9563b3) Xamarin.iOS Unified Migration 1.0 I have checked the attached project and checked the code mentioned in Comment 5 and observed that now if we set the IsVisible property to false then the event is not fired for that control. Screencast: http://www.screencast.com/t/qkbbfYwld This issue has been fixed. Hence I am closing this issue.