Weifenluo码头面板套件:浮动窗户是否使用其设计尺寸? [英] Weifenluo Dock Panel Suite: Float windows using their design size?
本文介绍了Weifenluo码头面板套件:浮动窗户是否使用其设计尺寸?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使浮动窗口在Weifenluo Dock Panel套件中使用其设计尺寸(而不是Dock Panel Suite的默认尺寸)?
How can I make floating windows use their design size (and not the Dock Panel Suite's default size) with the Weifenluo Dock Panel suite?
提示:我在SF.net的Dock Panel Suite论坛上尝试过一个建议,但这似乎不起作用.
Hint: I tried a proposition from the Dock Panel Suite forums at SF.net, but that doesn't seem to work.
推荐答案
这对我有用:
var topLeft = dockPanel1.Location;
topLeft.X += (dockPanel1.Size.Width / 2 - newForm.Size.Width / 2);
topLeft.Y += (dockPanel1.Size.Height / 2 - newForm.Size.Height / 2);
newForm.Show(dockPanel1, new Rectangle(topLeft, newForm.Size));
这篇关于Weifenluo码头面板套件:浮动窗户是否使用其设计尺寸?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文