0

I try to insert a Winform custom control inside WindowsFormHost. This custom control only works in a fixed height & width.

I try to specify the width & height for this custom control & the WindowsFormHost, but since WPF size is resolution-independent, the control got scaled and ruined the position.

Is there any way I can do to force the size of this custom control in pixel?

Hoàng Long
  • 10,746
  • 20
  • 75
  • 124

1 Answers1

0

Encapsulate the WindowsFormHost within a Canvas, cause with it you can explicitly position child elements by using coordinates that are relative to its area.

Oliver
  • 43,366
  • 8
  • 94
  • 151