title: How to avoid a "object reference not set to an instance of an object" exception in XAML code at design time?
body: <p>I have a problem with a wpf usercontrol which is of my own devising.
  The problem is that I get a <code>object reference not set to an instance of an object</code> exception in XAML code at design time, when I implement the usercontrol in my program.</p>
  <p>The designer showed me the following information:</p>
  <pre><code>at
  Microsoft.Expression.Platform.InstanceBuilders.InstanceBuilderOperations.InstantiateType(Type
  type, Boolean supportInternal)    at
  Microsoft.Expression.Platform.InstanceBuilders.ClrObjectInstanceBuilder.InstantiateTargetType(IInstanceBuilderContext
  context, ViewNode viewNode)    at
  Microsoft.Expression.Platform.InstanceBuilders.ClrObjectInstanceBuilder.Instantiate(IInstanceBuilderContext
  context, ViewNode viewNode)    at
  Microsoft.Expression.WpfPlatform.InstanceBuilders.FrameworkElementInstanceBuilder.Instantiate(IInstanceBuilderContext
  context, ViewNode viewNode)    at
  Microsoft.Expression.WpfPlatform.InstanceBuilders.UserControlInstanceBuilder.Instantiate(IInstanceBuilderContext
  context, ViewNode viewNode)    at
  Microsoft.Expression.Platform.InstanceBuilders.ViewNodeManager.CreateInstance(IInstanceBuilder
  builder, ViewNode viewNode)
  </code></pre>
  <p>but I think these messages are not really helpful...</p>
  <p>How can I fix or suppress this exception?</p>