I have a WPF application that should scale it's UI to fit the full screen - in different aspect ratios. I'm using grids for some of it, but that doesn't scale the font, and a ViewBox to scale a TabControl, but that distorts the text by changing it's aspect ratio.
Does anybody have an alternative that scales the geometry of controls, and the font size of the text, but keeps the same aspect ratio for the font?
I've been searching for a while but nobody seems to have answered this exact issue.
This issue seems to suggest I could write something myself from scratch, but I don't see any implication I can do get control of the font scaling: Making a Viewbox scale vertically but stretch horizontally
My own solution is primitive but does work to some extent.
To define control geometry, use grids with fractional width/heights, and other controls sizing to fit their content.
Calculate font scaling from the window's actual height divided by it's design height.
Set font size at the window level to designed size * scaling.
Problems:
WPF really makes this difficult IMO: it has scalable, resolution independent elements, but not much to actually help you build scalable user interfaces.