In WPF applications VisualTreeHelper.GetDpi()
gets the dpi when the application is launched. Subsequent calls return the same value even if the user has meanwhile changed the dpi in Settings -> Display.
How can I "reset" the dpi that VisualTreeHelper.GetDpi()
sees without restarting the application?
Some code:
Title = VisualTreeHelper.GetDpi(this).DpiScaleX.ToString();