开发者

Windows.Forms equivalent of Arrange, Measure and DesiredSize?

I've been assigned a project which requires me to render tree structures which, it turns out, is a mathematically nontrivial process.

I've found this project, which seems to more-or-less do the job, but it's in WPF, which really isn't my scene, and also seems to require a little bit of extra care and attention. M开发者_开发百科e being a Windows.Forms kind of programmer (to the extent that I'm any kind of GUI programmer, anyway), I need to bash it into WinForms before I can provide it with that care and attention.

I've managed to Get a few things looking about right, in this conversion, but I'd like to make sure of these functions before I go charging blindly off in the wrong direction.

I think that WPF Arrange looks equivalent to WinForms PerformLayout, WPF DesiredSize looks like WinForms PreferredSize and WPF Measure... Um...

Basically, I'm looking for any tips on automatically managing layouts in WinForms controls, in the same way that WPF manages layouts, and confirmation as to whether those apparent equivalences I've mentioned are actually equivalent.


WinForms has also some layout containers:

  • FlowLayoutPanel Represents a panel that dynamically lays out its contents horizontally or vertically.

  • TableLayoutPanel Represents a panel that dynamically lays out its contents in a grid composed of rows and columns.

  • Panel: Used to group collections of controls.

These containers can be combined to achieve the required layout.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜