XAML Patterns

Inspired by the Gang of Four, XAML Patterns collects common solutions to rich client problems.

XAML is a powerful and expressive language. It has a depth of features that few developers or designers will exhaust. At first glance, these features seem daunting. If they are applied haphazzardly, they can lead to unmaintainable markup. Often, more than one technique can be used to achieve the desired result.

XAML Patterns is a system of reasoning about XAML and related rich-client code. It helps you to select from among the possible solutions, and understand the reasons for choosing one over another. It helps bring order to the confusion of available options. By following the convention of the patterns, you will create maintainable and understandable code. The patterns provide a framework, as well as a set of nomenclature for discussing designs with other professionals.

Composition Patterns

Use child controls within a grid to compose a user interface. Make your controls cooperate for position while balancing whitespace.

View Model Patterns

Stateful, stateless, and reacitive view models. Use a view model locator for a view-first approach, or implicit data templates for view-model-first. Communicate between view models with a message bus or selection model. And invoke view services from the view model.

Design-Time Data

Based on your progress through the application development cycle, use in-place data, sample data, or a data source to visualize realistic data within the designer.