Bug 31678 - Strange button behaviour in Windows Store/ Universal apps
Summary: Strange button behaviour in Windows Store/ Universal apps
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 1.4.3
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-07-06 15:19 UTC by Andrew Coats
Modified: 2016-04-11 03:14 UTC (History)
5 users (show)

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

Repro (612.75 KB, application/x-zip-compressed)
2015-07-08 19:23 UTC, Chris King

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 Andrew Coats 2015-07-06 15:19:41 UTC
I'm seeing some unexpected behavior in a Xamarin.Forms but only in  Windows Store/ Universal apps. The app works as expected in iOS, Android, and Windows Phone.

The problem is the "Edit" button does not fire the 'EditCommand'. The work around is to get the EditCommand to fire is to insert a 'dummy' button. See the comment in <a href="https://bitbucket.org/awcoats/buttondemo/src/5b6f647d32c01314ea372821ea4231f6ffe30b44/Calicosol/Calicosol/ButtonDemoPage.xaml?at=master">ButtonDemoPage.xaml</a>.

The whole solution is in <a href="https://bitbucket.org/awcoats/buttondemo/src/5b6f647d32c0?at=master">BitBucket</a>. 

I'm using Xamarin.Forms version
Comment 1 Chris King 2015-07-08 19:23:54 UTC
Created attachment 11947 [details]

Comment 2 tvoth 2015-08-24 13:29:36 UTC
We have updated the project and attempted this again with Xamarin.Forms version and the problem still exists.

Updated Repository: https://bitbucket.org/tvothcalico/buttonissuedemo/overview

See Branch feature-update-forms-version (https://bitbucket.org/tvothcalico/buttonissuedemo/src/dc1b9ca33dfce2e722208f15cc82155caa4f2347/?at=feature-update-forms-version) for the version that uses
Comment 3 Jon Goldberger [MSFT] 2015-09-09 21:00:27 UTC
I was able to reproduce this issue using the "developer" branch of the repo linked in comment 2. 

Steps to reproduce are:
1. Launch the Windows Store app
2. Click the edit button. 

Expected result: App will switch to an editing screen to edit the details.

Actual result: No response to clicking the edit button. 

I noted that the Windows Store App project was referencing Forms version 1.4.4 but the other projects, including the PCL, were referencing Forms version 1.4.3. Updating all projects to 1.4.4 did not resolve the issue. 

Tried updating to Forms version but also this did not resolve the issue. 

However adding another button by uncommenting the "dummy" button on line 33 in ButtonDemoPage.xaml does resolve the issue and clicking the edit button works as expected.

## Notes 

I was not able to reproduce this issue using the updated Repo and the "feature-update-forms-version" branch. But looking again I see the workaround of adding an additional "dummy" button was applied. After commenting out line 33 in ButtonDemoPage.xaml I was able to reproduce the issue. 

The "master" branch was totally different and did not have the same start up screen with the Edit button, so ignore the Master branch of that repo.

## Environment

Microsoft Visual Studio Professional 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00079

Installed Version: Professional

Visual Basic 2015   00322-40000-00000-AA850
Microsoft Visual Basic 2015

Visual C# 2015   00322-40000-00000-AA850
Microsoft Visual C# 2015

Visual C++ 2015   00322-40000-00000-AA850
Microsoft Visual C++ 2015

Visual F# 2015 RC   00322-40000-00000-AA850
Microsoft Visual F# 2015 RC

Windows Phone SDK 8.0 - ENU   00322-40000-00000-AA850
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   14.0.20626.0
ASP.NET and Web Tools

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

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

GenerateUnitTest   1.0
Generates unit test code for methods in classes under test.

GitHub.VisualStudio   1.0
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager   3.0.0
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   14.0.50616.0
Microsoft SQL Server Data Tools

Visual Studio Tools for Universal Windows Apps   14.0.23121.00 D14OOB
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin (a1dc0d5)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

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

Xamarin.iOS (2c6a530)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 4 Jason Smith [MSFT] 2016-04-11 03:14:57 UTC
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer 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