System font changes - which UserPreferenceCategory to watch?
I'm trying to catch System font changes (i.e. the user changes the font via Display Settings -> Appearance) to invalidate some cached size information. The docs, don't say what event to wait for.
In experiments, I've changed the menu font, icon font and the General Font Size. In all cases listening to SystemEvents.UserPreferenceChanged, I get changes on three categories: Color, Window and General.
Why do we get Color at all? How is related to a font change?
The documentation for
General says:
Specifies user preferences that are not associated with any other category
- so shouldn't we get either General or Window? Not both.
Does someone from MS want to document the details of each category? Then we wouldn't be left guessing.