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.

Get Visual Basic 2012 Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.