WPF Designer in 3.5 SP1

I’ve just finished watching this Channel 9 video about the new features of the WPF designer in 3.5 SP1

WPF 3.5 SP1 Tools with Erick Ellis and Mark Wilson-Thomas

They talk a lot about the effort put into bug fixing and anyone who has used the Cider designer will appreciate that was needed. I was surprised though as installing SP1 was the final straw that caused me to set the XML editor as the default tool to edit XAML files. Before SP1 the Design tab of the WPF designer never worked for my current project, but I found the text editor of the XAML tab to have enough useful features to keep using it despite the slow loading and occasional crashes. Installing SP1 made it completely unusable and I reverted back to just using the XML Editor to write XAML.

I think the difficulties I experience are due to the way I implement the application. I create a Model object that is dynamically added as a resource at run-time. This is then set as the DataContext for the Main Window of the application and everything in the Model is then referenced in the UI using databinding. This architecture works really well in practice. The problem is that at design time there is no Model resource and even if there was it would not be in a valid state. I really need to be able to mock up an instance of the Model that the designer can use at design time to render the preview. Instead I just get errors and rotating discs anytime I try to use the designer.

From the demos in this video the designer looks like it is improving, but they only show simple scenarios like dragging buttons on forms and resizing grids. For production applications that make extensive use of databinding and advanced WPF features I’m not convinced it is useful yet. I would be happy with a XAML editor that did not have any design surface, but just gave you Intellisense, refactoring, document outline, code navigation and features like this. This would be enough to keep most developers happy and then Expression Blend could be used for the more graphical stuff. When I have some time I will investigate if such an editor exists and maybe see if I can modify my application to make it friendlier for the current designer.

I know it will take time for the tools to reach the level we were used to with Windows Forms and Webforms, we were spoilt after years of development of these. At least editing XAML by hand is not too difficult once you get used to the syntax, but it is frustrating to be back in the dark ages writing XAML without even Intellisense to help.

Technorati Tags:

Tags:

Comments are closed.