Design-Time Data

One of the most challenging aspects of working with WPF and other UI technologies such as Silverlight, Windows Forms, and ASP.NET is getting a preview of how the data will appear at runtime by the application. Well, if you draw a set of predefined UI controls in a panel, such as TextBox and Label controls, the final result will be pretty obvious, but as soon as you start to work with templates and custom visual styles, the task will became more challenging.

Expression Blend has a feature called blendability and that allows you to create a custom DataContext, specifically a design DataContext, which reflects the real data but can be displayed by Blend or Visual Studio while you are designing your UI so that you can view right ...

Get Applied WPF 4 in Context 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.