Bug 37204 - [WP] Native Global, Implicit Styles Are Ignored
Summary: [WP] Native Global, Implicit Styles Are Ignored
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.0.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: E.Z. Hart [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2015-12-21 17:54 UTC by Jimmy [MSFT]
Modified: 2016-02-08 22:03 UTC (History)
2 users (show)

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


Attachments
Repro project (115.66 KB, application/x-zip-compressed)
2015-12-21 17:54 UTC, Jimmy [MSFT]
Details
expected result (27.38 KB, image/png)
2015-12-21 17:55 UTC, Jimmy [MSFT]
Details


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 FIXED

Description Jimmy [MSFT] 2015-12-21 17:54:57 UTC
Created attachment 14367 [details]
Repro project

### Overview
On Windows Phone, global implicit styles set in the native App.xaml file (not Forms App.xaml) are being ignored. This worked previously in Forms 1.5.1.


### Steps to Reproduce
1. Run the attached Windows Phone project


### Expected Results
The Entry and Label elements should have a large font size and some other customizations. See expected results image.


### Actual Results
The Entry and Label controls have their default styling.


### Environment Info
Tested with Forms 2.0.1-pre1
Comment 1 Jimmy [MSFT] 2015-12-21 17:55:22 UTC
Created attachment 14368 [details]
expected result
Comment 2 E.Z. Hart [MSFT] 2016-02-08 22:03:43 UTC
As of the latest stable version (2.0.1.6505), the styling applied to the Label (TextBlock) in the example project works without modification.

For the Entry control, the style should target the Xamarin.Forms.Platform.WinPhone.FormsPhoneTextBox class. In the App.xaml of the example project, replace

<Style TargetType="toolkit:PhoneTextBox">

with 

<Style TargetType="winPhone:FormsPhoneTextBox">

and be sure to add the 'xmlns:winPhone="using:Xamarin.Forms.Platform.WinPhone"' namespace declaration to the Application tag. The style will then produce the expected results shown in the attached screenshot.