views:

145

answers:

4

I'm about to finish the core components of my application and I'm willing to change gears soon and do a bit of GUI programming. From the beginning I decided to write a WPF-based application for two reasons:

a) I want my application to be visually stunning and 100% skineable.
b) I completely suck at designing user interfaces and then some more.

So the plan is to have a GUI artist involved in the project and let him take over every visual aspect of it. However, I've never worked in a WPF project before and have no clue on how to deal with this. I'd like to hear from people with experience in this field who can give some advice.

Thanks.

Edit:

I didn't mention it but yes, the artist will be using the MS Expression Blend software. I'm more interested in knowing how to work with him rather than what tools he'll be using.

+1  A: 

Best way to use Expression Blend for the Designer to create the UI. Then you can hook up the events.

The is the goal of MS with Sliverlight and XAML. The Expression Designer tools are for just that. Make sure the design meets the final product everytime, becuase the developer and the designer use tools to create the correct XAML everytime.

David Basarab
You have to go beyond just using Blend. You also have to name your controls in such a fashion that they can be swapped out/skinned etc. The Code-Behind has to only use these by names. e.g. PART_Thumb in certain .Net controls.
sixlettervariables
A: 

Expression Blend is your answer, as Longhorn213 says.

The brilliant thing with Blend is that it uses the same project/solution format as Visual Studio, but basically focuses on the XAML. That way, the designer can play about with the application as much as he/she likes without messing up your code.

Your tasks would be much more than 'hooking up the events', though. More likely, you would work alternately, even simultaneously on the project. You would provide datasources, events etc. which he/she would consume and trigger. Perhaps he/she would want some custom controls that you would build. And so on.

The VS/Blend combination is a wonderful new world, finally enabling real collaboration between developers and designers throughout the project lifecycle. Hurrah!

Tor Haugen
+2  A: 
  • Make sure your project is using the MVVM pattern. This makes it much easier for the UI designer to do their work without affecting other parts of the application.
  • Use Commands rather than Events and expose them to binding in the VM
  • Avoid any code in the View's code behind. When you use commands the only thing that really needs to be there is a line setting the window's DataContext to the ViewModel. Occasionally you'll also have event listeners to listen to ViewModel events to pop new windows.
  • Use Databinding as much as possible, it just makes everything work much more smoothly.
Bryan Anderson
Technically, this is indeed the way to go. If you, as developer, use these patterns, a maximum decoupling of UI and business code will be achieved.
Tom Deleu
+2  A: 

Always create a fully functional GUI first and then pass it over to the artist to "skin" it - this way the internal structure of the XAML will be right for all the logic and data binding.

If you let the artist design the skin and then add the logic you are very likely to get XAML you can't use directly and you'll be back in the old "try to make the app look like the pretty picture" that WPF is supposed to solve.

Of course, you will have to get all the usability aspects working (arrange elements by user workflow, support keyboard navigation, etc) before you pass the files to the artist and probably again after you get the results back.

Nir