Bug 38055 - There is no way to define a style with a custom font size that obeys accessibility settings
Summary: There is no way to define a style with a custom font size that obeys accessib...
Status: RESOLVED INVALID
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.0.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-01-26 15:06 UTC by John Miller [MSFT]
Modified: 2016-12-20 21:17 UTC (History)
3 users (show)

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

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 INVALID

Description John Miller [MSFT] 2016-01-26 15:06:04 UTC
**Overview:**

   There is a requirement to be able to define a Style with a FontSize that will obey accessibility changes on iOS (presumably, whatever the equivalent on Android is also). 

   The current support that is close to this (basing a style on an existing dynamic style) does not let you specify/change the default FontSize for that style and therefore does not fulfill this requirement. 

**Steps to Reproduce:**

   <Style x:Key="CustomStyle" TargetType="Label" BaseResourceKey="SubtitleStyle">
	<Setter Property="Label.FontSize" Value="8"/>
	<Setter Property="Label.TextColor" Value="Color.Pink"/>
   </Style>

**Actual Results:**

   The FontSize always stays at 8, regardless of accessibility changes. 

**Expected Results:**

   FontSize should start at 8 when on "default" accessibility and then obey any changes.

**Build Date & Platform:**

   XF 2.0
Comment 1 John Miller [MSFT] 2016-01-26 16:23:39 UTC
I misunderstood how this worked on iOS. I did not realize that the font sizes being used are inherited from the OS, using UIFont.Preferred*. Changing the FontSize in a Style would already override that. 

On iOS, to manually handle font size changes when accessibility changes, you can listen for the "UIContentSizeCategoryDidChangeNotification" which is fired when accessibility changes. This might also be required if using a non-system font (custom fonts). This is probably not a bug and it's already implemented as the OS supports - someone from the Forms team, please confirm.
Comment 2 Jason Smith [MSFT] 2016-12-20 21:17:37 UTC
Correct this is not a bug, cheers :)