EDITOR WEAKNESSES

Visual Studio’s Windows Forms Designer has been around for a long time, and over the years it has become extremely powerful. In contrast, the WPF Designer is relatively new and lacks many of the features included in its more mature cousin.

Although the WPF Designer is a WYSIWYG tool, it has a lot of weak spots. A small sampling of these weaknesses includes:

  • The Properties window does not provide editors for many types of objects, and many of the editors it does provide are incomplete. For example, the Properties window provides no tools for editing a control’s Clip property, which determines the geometry used to clip the control’s contents.
  • The Properties window provides tooltips describing properties but only when the mouse is hovering over the property’s name, not while you are editing the property. Some of the tips are also fairly incomplete, saying things like Integer Canvas.ZIndex.
  • The designer surface has no snap-to-grid mode.
  • The XAML code editor’s IntelliSense is incomplete and doesn’t provide help in many places where it would be useful (although it’s much better than nothing).

The WYSIWYG designer has enough weaknesses that it is often easier to build parts of a user interface by using the XAML code editor. For example, the designer provides no methods for making resources, styles, and templates, three items that are essential for building a maintainable interface. Fortunately, these things are not too difficult to build in the XAML code editor.

In all fairness, the WPF Designer has improved greatly since its first version and includes several enhancements added since the previous version, including better enumerated property support and primitive brush editors. It also crashes much less often and gets confused about how to draw its controls much less frequently. Hopefully it will catch up with the Windows Forms Designer someday.

All of these issues aside, the WPF Designer is a powerful tool. It lets you quickly build the basic structures of a WPF window and layout controls. You may need to rearrange controls somewhat and build additional elements such as resources and styles in the XAML editor, but the WYSIWYG surface can get you started.

Though the XAML editor also has shortcomings, it does provide the tools you need to fine-tune the user interface initially built by the designer surface. Together the two pieces of the WPF Designer give you everything you need to build aesthetically pleasing and compelling WPF user interfaces.


BUILDING WITH BLEND
Microsoft’s Expression Blend product provides some of the features that are missing from the WPF Designer. For example, it provides better tools for creating styles and templates, better brush editors, and the ability to record property animations.
It still has its drawbacks (one being the fact that there is no free version) but it complements Visual Studio’s WPF Designer nicely. Learn more about Expression Blend or download a trial copy at http://www.microsoft.com/expression/products/blend_overview.aspx.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.208.72