Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Detect Design Time Mode in WPF

0.00/5 (No votes)
24 Mar 2010 1  
In order to detect whether your application is executing as a result of being in a designer use the GetIsInDesignMode method of DesignerProperties as the following demonstrate.C#bool designTime = System.ComponentModel.DesignerProperties.GetIsInDesignMode( new...

In order to detect whether your application is executing as a result of being in a designer use the GetIsInDesignMode method of DesignerProperties as the following demonstrate.


C#


C#
bool designTime = System.ComponentModel.DesignerProperties.GetIsInDesignMode(
    new DependencyObject());

VB.NET


VB
dim designTime as Boolean = DesignerProperties.GetIsInDesignMode(
    New DependencyObject)

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here