wolfgang ziegler


„make stuff and blog about it“

WP7–How To Detect Design Mode?

January 1, 2012

Often, when developing (WP7) Silverlight apps, you may want to display certain data only in design mode. This happens, when the actual data is only available at runtime because it is retrieved e.g. from a web service.

For these cases it’s quite handy to default-initialize your classes to have values to display in the Visual Studio designer. To make sure this initialization happens only in designer mode, the framework provides following property:

DesignerProperties.IsInDesignTool;