Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Windows] Fix Device Style inheritance #324

Merged
merged 2 commits into from
Sep 30, 2016
Merged

[Windows] Fix Device Style inheritance #324

merged 2 commits into from
Sep 30, 2016

Conversation

pingzing
Copy link
Contributor

@pingzing pingzing commented Aug 26, 2016

Description of Change

Changes the Windows Phone RT platform resource lookup to get Setters from ancestor Styles in addition to the defined style.

Tests omitted because, as far as I can tell, testing the PlatformResourceProviders isn't possible.

Bugs Fixed

  • Part 1 of fixing 47873 - Most Device Styles do not render correctly in Windows Phone 8.1 (RT) applications. Doesn't address the failure to lookup ThemeResources, however. Once that's addressed, will fix certain styles, such as the BodyStyle, which maps to the native BodyTextBlockStyle, which only directly defines a new TextBlock.LineHeight value. As Xamarin's style translation ignores that particular property, any Label using the Xamarin BodyStyle would get an unstyled Label, when they should, at the very least, receive the styling from the native BaseTextBlockStyle.

API Changes

None.

Behavioral Changes

There should be no visible changes yet. The only two Device Styles that render correctly on Windows Phone 8.1 RT, TitleStyle and SubtitleStyle do not have any elements inherited from their BasedOn Styles that a Xamarin Style uses. However, if 43783 were to be fixed without also fixing this, the styles would be incomplete.

Recommend do not merge until 43783 is fixed.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense

@dnfclas
Copy link

dnfclas commented Aug 26, 2016

Hi @pingzing, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla2.dotnetfoundation.org.

TTYL, DNFBOT;

@dnfclas
Copy link

dnfclas commented Aug 26, 2016

@pingzing, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.

Thanks, DNFBOT;

@jassmith jassmith merged commit c07c231 into xamarin:master Sep 30, 2016
@samhouts samhouts added this to the 2.3.4 milestone Jun 27, 2018
mattleibow added a commit that referenced this pull request Jan 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants