0

I am creating a personal project to get the hang of WPF and want to play around with its powerful layouts and options. Is it possible to scale my WPF form/window with the font size set in the windows settings? For example, a user can change their font sizes through the windows OS and I want my form to scale accordingly. How would I approach starting to set this up?

Edit: My original question is not phrased correctly. Essentially I am looking for an explanation on how WPF handles automatic scaling differently than winforms. Also I want to know how to set up automatic scaling from the beginning in a wpf form.

Xuluu
  • 33
  • 5
  • Possible duplicate of [How to scale form with font size in WPF?](http://stackoverflow.com/questions/9556966/how-to-scale-form-with-font-size-in-wpf) – Bradley Uffner Mar 30 '17 at 17:38

1 Answers1

0

You should be able to accomplish this by setting the AutoScaleMode on your controls:

this.AutoScaleMode = AutoScaleMode.Dpi

or

this.AutoScaleMode = AutoScaleMode.Font

Not sure which will work best for the OS Font scaling (i am assuming DPI would be the choice, but i could be wrong).

Ginger Ninja
  • 759
  • 8
  • 21
  • Am I adding this line in my .cs constructor? Because I don't see a property called "AutoScaleMode" to even set it. – Xuluu Mar 31 '17 at 17:45