Skip to content

WPF/Accessibility: Setting FontSize property prevents system font scaling from working #5405

Open
@yuyoyuppe

Description

@yuyoyuppe

Environment:

  • .NET Core 3.1

Problem description:
While doing an accessibility pass for FancyZones Editor in PowerToys, we've encountered this issue. I've given a detailed explanation in this comment, but it boils down to the difference between FontSize property behavior in UWP/WPF.

Actual behavior:
Setting FontSize property in WPF prevents system-wide font scaling setting from working, no matter which context switch overrides are enabled.

Expected behavior:
Same as with UWP apps: elements' font size changes depending on the scale setting even when FontSize is explicitly set for them.

Minimal repro:

  • create Blank WPF app
  • go to MainWindow.xaml and add the following xaml inside the Grid:
<TextBlock Text="THE TEXT" FontSize="24"/>
  • launch the application
  • Start ->"Make text size bigger" -> Change to e.g. 200%
  • Observe that the text size remains the same

Now repeat the steps with a blank UWP app and observe that "Make text size bigger" option affects text size.

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions