I developed some userControl that contain some information check on the \'IsVisible\' method ( override method ).
When i using this usercontrol on some window - i se
public partial class MainWindow : Window
{
public MainWindow()
{
if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
Console.WriteLine("The main window is in design mode.");
}
}
The other answer is technically correct but I am providing this one to clarify the namespace and the usage.