Nella lista dei WPF Disciples si è discusso di come determinare in maniera corretta la modalità Design Mode, ovvero quando il codice sta girando nel contesto di un desginer.
  Le risposte sono:
  WPF
             1: public static class Designer
       2: {
       3:    private static readonly bool isDesignMode;
       4:  
       5:    public static bool IsDesignMode {get { return isDesignMode; }}
       6:  
       7:    static Designer()
       8:    {
       9:       DependencyProperty prop = DesignerProperties.IsInDesignModeProperty;
      10:       isDesignMode = (bool)DependencyPropertyDescriptor.FromProperty(prop, typeof(FrameworkElement))
      11:                                                        .Metadata.DefaultValue;
      12:    }
      13: }
 
 
Silverlight 3
  
       1: bool onDesignMode = DesignerProperties.IsInDesignTool;