Bug 52706 - Regression: the Xamarin Forms Previewer now does not apply implicit styles
Summary: Regression: the Xamarin Forms Previewer now does not apply implicit styles
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: unspecified
Hardware: PC Windows
: --- critical
Target Milestone: C9SR0
Assignee: Bugzilla
Depends on:
Reported: 2017-02-23 12:59 UTC by Dimitar Dobrev
Modified: 2017-03-10 12:43 UTC (History)
10 users (show)

Tags: Cycle9R
Is this bug a regression?: Yes
Last known good build:

Sample project to reproduce the bug (299.55 KB, application/x-rar)
2017-02-24 13:17 UTC, roberto.can
Screenshot of XS. (295.08 KB, image/png)
2017-03-09 14:14 UTC, Roshan Mankani

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 Dimitar Dobrev 2017-02-23 12:59:41 UTC
# Steps to reproduce

1. Create a Xamarin Forms page;
2. Add any component to it;
3. Add an implicit style for the same type of component to App.xaml;
4. Rebuild the solution, etc, so that the Xamarin Forms Previewer works with the latest assemblies;
4. Try previewing the page.

# Expected behaviour

The page is previewed with the implicit style applied to the component.

# Actual behaviour

 The page is previewed without the implicit style applied to the component.

# Supplemental info (logs, images, videos)

# Test environment (full version information)

Microsoft Visual Studio Community 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01055

Installed Version: Community

Visual Basic 2015   00322-20000-00000-AA017
Microsoft Visual Basic 2015

Visual C# 2015   00322-20000-00000-AA017
Microsoft Visual C# 2015

Visual C++ 2015   00322-20000-00000-AA017
Microsoft Visual C++ 2015

ASP.NET and Web Tools 2015.1   14.1.21111.0
ASP.NET and Web Tools 2015.1

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

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

Azure App Service Tools v2.9.6   14.0.21111.0
Azure App Service Tools v2.9.6

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.2.2100.0
Microsoft Azure Data Lake Tools for Visual Studio

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


GhostDoc   5.4.16325.0
GhostDoc automatically generates XML documentation comments.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

Merq   1.1.14-alpha (21c13c9)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft .NET Core Tools (Preview 2)   14.1.21111.0
Microsoft .NET Core Tools (Preview 2)

Microsoft Azure Hive Query Language Service   2.2.2100.0
Language service for Hive query

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.9.41104.6

Mono Debugging for Visual Studio   Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   3.5.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.

Refactoring Essentials   1.0
Refactoring Essentials Extension Details

SQL Server Data Tools   14.0.61021.0
Microsoft SQL Server Data Tools

SQLite & SQL Server Compact Toolbox   4.6.0
SQLite & SQL Server Compact Toolbox adds scripting, import, export, rename, query execution and much more to SQL Server Compact & SQLite Data Connections.

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript tools for Visual Studio

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

Xamarin.Android (9578cdc)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS (35d1ccd)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 1 Paul DiPietro [MSFT] 2017-02-23 17:18:59 UTC
Reassigning to Previewer team to look at this.
Comment 2 Alan McGovern 2017-02-23 17:41:11 UTC
Can you attach the log files from a session where this failed and/or a sample of the project you are working with?
Comment 3 Dimitar Dobrev 2017-02-23 17:59:57 UTC
No, I can't unless you assure me you've tried it yourself and it doesn't work, and that you've also tried it with your previous version - I pointed out it's a regression - and it does.
Comment 4 Alan McGovern 2017-02-23 19:32:14 UTC
The sample app we used for testing implicit styles is here, https://github.com/xamarin/xamarin-forms-samples/tree/master/UserInterface/Styles/BasicStyles. If that sample does not work for you then it would be great if you could attach a copy of the log files when using this sample. If it does work for you then a way to reproduce the problem you're experiencing will be quite helpful.

Also, can you confirm that you're referencing Xamarin.Forms 2.3.3 or newer? Preferably 2.3.4 or newer.
Comment 5 Dimitar Dobrev 2017-02-23 20:09:32 UTC
I hadn't indicated the version of Xamarin Forms because I used the same one before and after upgrading Xamarin - that is, the version doesn't matter. Anyway, it is https://www.nuget.org/packages/Xamarin.Forms/ . As for your sample, it works for me but please read the steps more carefully next time. I said I placed the implicit style in App.xaml, not in the page. This way it doesn't work with your sample either.
Comment 6 roberto.can 2017-02-24 12:42:10 UTC
I have installed the last Xamarin update and now the previewer doesn't apply any implicit style that is defined inside App.xaml on my content pages.

I also noticed that local implicit styles in the content page's resources are applied with no problem.
If I put a Key at the style to turn it explicit (App.xaml), the style works on any page but it is just a workaround for this moment.


Windows PC
Xamarin.Forms =
VS 2015 Update 3

Xamarin Studio Community 6.2 build 1821 with all updates 
XCode 8.2.1

Before the update implicit styles were ok on the previewer.
Comment 7 Alan McGovern 2017-02-24 12:59:07 UTC
Robert, if you can attach a sample reproducing the problem we will be able to use it to confirm we have fixed the issue you're experiencing. Without a sample we can only guess when we've fixed the precise issue you are experiencing.
Comment 8 roberto.can 2017-02-24 13:17:17 UTC
Created attachment 19943 [details]
Sample project to reproduce the bug

I'm sending you a sample project and a screenshoot.
Thank you!
Comment 9 Dimitar Dobrev 2017-02-28 08:45:18 UTC
Even if Roberto hadn't added a sample, I had already thoroughly explained the bug to begin with. This needs no further information.
Comment 10 Alan McGovern 2017-02-28 18:13:46 UTC
Thanks for the sample. We have the root cause diagnosed and are working on a fix.
Comment 11 Alan McGovern 2017-03-08 10:36:10 UTC
Thanks for reporting the issue. Implicit styles will work correctly again with the upcoming Xamarin.Forms 2.3.4-pre3 release.
Comment 12 Roshan Mankani 2017-03-09 14:14:28 UTC
Created attachment 20248 [details]
Screenshot of XS.

Please find the attachment. This bug is reopened.
Comment 13 Roshan Mankani 2017-03-10 07:49:05 UTC
I have verified this bug on build: Xamarin.Forms 2.3.4-pre3 
We are good to close this bug as it work as expected.

Xamarin.Forms = 2.3.4-pre2
Xamarin Android
Xamarin Version 6.3(build 831)