开发者

Are there no built in C# GUI Layouts?

I'm used to the GUI frameworks in Java as well as the QT GUI framework, and I'm used to the various layout managers. It doesn't seem that C# has any layout managers built in, or am I missing something?

2 Year Later Edit

I just want to point out to any readers of this question that in hind-sight, my question was misplaced. With proper anchoring and docking of child controls, having a need for the layout managers 开发者_JAVA技巧of Java and QT4 is nearly non-existent.


WPF does have layout managers, see:

http://msdn.microsoft.com/en-us/library/ms745058.aspx

If you're coming from a Java background, then the section "Panel Elements and Custom Layout Behaviors" will be of particular interest.


Both WPF and Windows Forms provide layout capabilities (WPF is just much better at it).

You can achieve moderately complex layouts in Windows Forms too by utilizing the Dock and Anchor properties of controls. Personally I learned what can be achieved and how through Petzold's book on WinForms. If you don't have access to that book, read this short article.


chibacity is right, WPF is loaded with layout managers, all of them are very good.

However if you're going down the WinForms route, you're stuck with TableLayoutPanel, FlowLayoutPanel and SplitContainer. As well as the usual manual Panel and GroupBox controls.


No, you are not missing anything.

.NET does not have built in layout managers for Winforms/Webforms/Console development.

Probably because Visual Studio has good designers, obviating the need.

WPF and Silverlight (both using XAML) do have them, though they are not exactly the same as the Java ones.


WPF and Silverlight have different "Panels" that work similar to the layout managers in other languages.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜