开发者

Winform custom control in WPF

I'm inserting a custom winform control in a WPF/ XAML window, however i'm realising that the sizing seems to be very d开发者_如何学运维ifferent, what i designed in winform to be 730pixels wide for instance, when placed via a WindowsFormsHost, in a container 730pixels (or at least i think they're pixels..) wide, the control looks much larger and doesnt fit in the host and results in clipping from the right and bottom.

Would anyone know how to make these sizes match or something? I'm really at a loss and its very difficult to fix a custom control to make it look as it should off hand on WPF! Please help!


WPF sizes are not in pixels, they are in units of 1/96 inch. Your video adapter is probably set to 120 DPI, you'd have to make it 730 / 96 * 120 = 913 units wide.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜