![]() So in the example we set ConverterParameter to 15 / 12 = 1.2. The base FontSize is the value of FontSize on M圜ontrol when the text scaling is 100% technically this depends on the OS and OS theme - it's the value of an OS system metric that WPF exposes as SystemFonts.MessageFontSize - but in practice it seems to be 12. Set the binding's ConverterParameter to the ratio of the original FontSize to the "base" FontSize.Implement an IValueConverter that scales its input by the converter parameter, and add an instance of this converter to a ResourceDictionary visible to the binding, using the key "ScalingConverter".You can add such an element if necessary it doesn't need to display anything. it neither declares FontSize nor inherits from an ancestor that does declare it). ![]() For "M圜ontrol", choose a convenient element visible to this binding that uses the default FontSize (i.e.You can't specify FontSize relative to the "base" size, but you can get the desired effect of resizing the text when the user applies the "make text bigger" slider.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |