tags:

views:

66

answers:

3

Which technology (WPF or Winforms) should be used if UI supposed to be highly customizable like controls layout/design could be change by user and such sort of UI customization.

Kindly mention best practices along to achieve that...

+2  A: 

I just recently developed a designer in both WinForms (company req) and WPF (to see how much better it was). WPF has a definate edge, especially when it comes to nicer looking controls and control transparency.

This was my first actual WPF project, other than just messing around, so I was learning as I went. I found this series on creating a diagram designer very helpful. I didn't really do the same things that this article talks about, but more of a hybrid between that and my WinForms app.

I have to admit that the UI functionality was up and running much faster in the WPF version than with the WinForms version.

smoore
so can you suggest any best practice to achieve aforementioned customizable UI?
Muhammad Adnan
Well, these are the only applications I've written this way, but I just tackled it one problem at a time. The only thing I did before starting was decide on how I was going to store all of my data generically and as scalable as possible (I ended up using Lists of Objects), then wrote a serializable class to store all of that data. Then I just hacked away at the functionality, divide and conquer: func1-make something draggable, func2-allow objects to be added dynamically, func3 - func1+func2, func4 - store object info to file... and on and on I went until it did everything that I wanted
smoore
+1  A: 

WPF I have found the easiest to create controls on a fly. Because I can just attach them as child controls to the parent, and the Grids, Dock Panels, just make life easier.

I found WinForms to be clunky to always work with. However I come from a Web background and Xaml makes sense to me.

David Basarab
I'm a WinForms desinger, so Xaml didn't make any sense to me, but after diving into it for two weeks I totally agree.
smoore
so can you suggest any best practice to achieve aforementioned customizable UI?
Muhammad Adnan
A: 

WPF controls are design and lookless. That means you have a default view of them, but everything detail of a WPF control can be overridden. It's almost akin to using CSS. In the WPF world, you do not create custom controls like you do in WinForms. The main thing in WPF world is "styling" controls and defining a style for them. It just happens that the style also controls the layout and the form of the controls.

WPF is FAR superior for designing and style of UI. Check out these two top WPF companies and tell me if this stuff is easy to do in WinForms:

masenkablast