I am using WPF. I have a static class that performs some settings that are not available in development mode. This constructor is called by the window in design mode, as a result of which an exception is thrown.
How to determine the development mode in a static method, so I can call the corresponding development mode behavior?
The recommended approach does not work for static methods.
Edit:
The static constructor is called from xaml, so I cannot conditionally call it (unless I moved the call to code that I would like to avoid).
In the window: <Window ... HelpProvider.Keyword="some_help_topic.html">
In the class:
static HelpProvider()
{
}
source
share