Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!news.glorb.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe09.iad.POSTED!8ad76e89!not-for-mail From: Arved Sandstrom User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Swing versus Windows.Forms References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Lines: 36 Message-ID: <149Jp.3939$x11.1762@newsfe09.iad> X-Complaints-To: abuse@newsgroups-download.com NNTP-Posting-Date: Sun, 12 Jun 2011 20:11:41 UTC Organization: Public Usenet Newsgroup Access Date: Sun, 12 Jun 2011 17:11:40 -0300 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5276 On 11-06-10 01:28 PM, Stefan Ram wrote: > Arved Sandstrom writes: >> OT for CLJP: writing desktop apps in C# 4.0 and WPF (XAML heavy) is yet >> another eye-opener for me. I'm mostly a Java SE/Java EE guy and so every >> time I get a chance to do some pro work in C# it's refreshing. >> Particularly GUI work. > > Last time I looked, the library did not even offered me > lay-out managers, and wanted me to specify the component > geometry in some screen unit. > > I tried to code my way around this and build GUIs without a > hard-coded geometry. > > For example, when I tried to create a form with a button, > an input field and an output field, I had to set its size > /manually/ (what a disgust, just look at the »5«!): > > form.Size = new System.Drawing.Size( button.Size.Width, 5 * input.Size.Height ) > > , and there was no default layout mangager which would do > this for me. But maybe I just did not known the most elegant > way to do this in C#? > You would typically use Grid, DockPanel and/or StackPanel to position controls. These _are_ your layout managers. :-) If you weren't too turned off that time, a good starting point to see what is currently available is http://msdn.microsoft.com/en-us/library/ms746927.aspx Particularly the sections on Resources, Styles & Templates, and the Layout System. AHS