WPF Host on v5 vs v6 - wpf in v5 look weird

Controls in v5 don’t look the same and whole UI is weirdly changed margins are off and things are in general smaller and not in position. Is there any remedy for that? @dale @nathanletwory

I think @JohnM did the wpf host code.

My guess is it is related to high dpi awareness, V5 is not at all good at it, there has been a lot of effort into high DPI awareness in V6. What are your DPI settings and are they the same for all of your displays? Rhino 6 is hight DPI aware but not per display DIP aware. You can run the TestDpiScale command in Rhino 6 to see what it is doing internally with regards to DPI scaling.

Hmm… I never thought about that in this way im not dpi aware cause i thought WPF handles this on its own but here probably host sets own story. Its not unusable it is just distracting for me Thanks for clue ;).

If anybody will have similar problem solution is weird indeed but works i found it on stackoverflow - https://stackoverflow.com/questions/4679172/text-renders-differently-on-wpf-window-and-inside-elementhost

Winform holder should have (i made in *.designer.cs):

this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

and fontsize should be created again in form which holds element host:

  public MyForm()
this.Font = new System.Drawing.Font(
    "Segoe UI",

You may find this useful (too):

– Dale