2

We are starting a WPF project that will use Prism 4.

We have a designer who will design the screens using Blend / Sketchflow.

We had originally thought of using the xaml that Blend generated directly. However, we have been advised that this is not a good idea due to the readibility of the xaml created.

Has anyone any experience with using the xaml directly from Blend? Is this something that you would recommend or not?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Shiraz Bhaiji
  • 64,065
  • 34
  • 143
  • 252

2 Answers2

3

We had originally thought of using the xaml that Blend generated directly. However, we have been advised that this is not a good idea due to the readibility of the xaml created.

It completely depends. Blend, especially newer versions, does a fairly good job of creating reasonable xaml.

That being said, it's still a designer - most designers don't write the same code you would when writing by hand. It's often still useful to "clean up" the designed code as you're working, so understanding what Blend is doing can be helpful.

That being said, there is no problem with using Blend's xaml directly, especially if you don't need/want to hand edit it to add additional functionality, or work with it outside of Blend at all.

Reed Copsey
  • 554,122
  • 78
  • 1,158
  • 1,373
3

One thing I've noticed about using Blend is the Margin it uses, and in general, how fast Blend can mess up the layout of your views.

Let me give you an example, when you place let's say, a Button on your initial Grid, unless you specify rows/columns explicitely, Blend will just put a Margin to set your Button's place.
This is awful.

Now using Blend/Sketchflow is not a bad idea, but your designer will absolutely have to learn a bit of programmation logic, at least the layout things. And if he's going to re-style UIElement from scratch, he's in for a rollercoaster of a learning curve...

Louis Kottmann
  • 16,268
  • 4
  • 64
  • 88
  • I would even recommend to mainly use Blend for preview purposes while writing most of the XAML manually, this automatically stops Margin and Alignments chaos. – H.B. Aug 30 '11 at 17:25
  • I actually write 100% of my XAML manually, but if they have a designer in the team, and since it's the main purpose of Blend, they should use it. That said, the generated XAML will have to be reviewed. – Louis Kottmann Aug 30 '11 at 17:28