tags:

views:

641

answers:

3

Hi. How to design a beautiful win forms UI.(a little like MSN message client)

I googled and couldn't find the way to start my befault win forms learning. Did I miss some C# win form design tech? Must I start .net 3.5 study?

.net 2.0 vs2005 used.

+7  A: 

You should consider using the Windows Presentation Foundation (WPF) instead of Winforms for custom UI design. Although you'll have to upgrade your development environment to Visual Studio 2008 or Visual Studio 2010.

WPF is based off of XAML which is an XML based format for defining your application, events, and more. WPF is the recommended technology to use over Winforms by Microsoft. You can get started with this MSDN tutorial: Getting Started with Windows Presentation Foundation.

WPF is nice because it is based on DirectX (no you don't need to know DirectX at all) and will use the GPU and not GDI objects like traditional other UI platforms from Microsoft.

Otherwise if you are really set on using Winforms I'd suggest buying a 3rd party controls library.

Likely the price of Visual Studio though is warranted for just about any project considering hourly wages (times) the amount of hours you would put into any project vs Visual Studio price. You can also use the Express edition of Visual Studio.

Brian R. Bondy
Express Edition is free
Joel
@Joel: I added to the answer thanks for the suggestion.
Brian R. Bondy
Unfortunately, there are downsides: It's aren't nearly as many controls for WPF, not as many tutorials, and it doesn't work well over Remote Desktop
BlueRaja - Danny Pflughoeft
@BlueRaja: Not as many controls? Disagree, and if you want one that is only in winforms you can easily integrate winform controls. Not as many tutorials? Don't think so and I'm sure the number of WPF tutorials are steadily increasing faster than the number of Winform tutorials. Doesn't work over remote desktop? See here: http://stackoverflow.com/questions/198030/are-there-problems-with-rendering-wpf-over-remote-desktop-under-windows-xp
Brian R. Bondy
It does work over RDP, but poorly, as everything is sent as rendered graphics instead of GDI commands
Robert Jeppesen
+5  A: 

IMO, "How do you design a beautiful UI" is like asking "How do you paint a beautiful painting?" You can make beautiful paintings in oil, water colour, or even charcoal - it's up to the skill of the artist.

Having said that, using WPF really will make your life easier when it comes to doing custom UI. WinForms is pretty hard-coded to use the standard Windows widgets. Personally, I don't think that's a bad thing: consistency of UI is important, too.

Dean Harding
Before anybody gets nit-picky, I know a charcoal drawing is not a "painting", but you get the idea :)
Dean Harding
@codeka: I like your analogy, but having a paintbrush and taking art lessons will help in any case. +1
Brian R. Bondy
+1  A: 

If you have client-side web based UI experience AND you cannot upgrade to WPF, you could use the WebBrowser control along with jQuery (or any other javascript framework).

This would allow you to implement a nice animated UI (ie using jQuery UI) as well as CSS for custom styling of page elements.

Using the WebBrowser's "ObjectForScripting" and "Document/DOMDocument" properties you get complete 2 way access between your Javascript code and C#/VB.NET code.

The biggest advantage of this approach is that you get to apply your existing DHTML/Javascript/CSS knowledge as opposed to learning WPF.

The biggest downside is probably that the Webbrowser control is a largish dependency because it simply wraps the underlying HTML engine used by Internet Explorer. However this can also be a positive as you get the full DHTML object model in your own application.

Ash