title: Keep Control's default property from being included into Design-time serialisation
body: <p>I have UserControl, created half in VS Designer and half in code.
  I want to create new instance of this UserControl from code, but set some of its default properties to different values every time.<br>
  Example (edit w real code):</p>
  
  <pre><code>// in my Main Form..
  var newFrame = new RPictureFrame(); // my UserControl
  newFrame.Width = 50;
  newFrame.Height = 50;
  newFrame.Location = new Point(0,0);
  this.Controls.Add(newFrame);
  
  newFrame = new RPictureFrame();
  newFrame.Width = 200;
  newFrame.Height = 400;
  newFrame.Location = new Point(0,150);
  this.Controls.Add(newFrame);
  </code></pre>
  
  <p>Original <strong>wrong</strong> example:</p>
  
  <pre><code>var newMyUserControl1 = new MyUserControl();  
  newMyUserControl1.size.Width = 50;  
  
  var newMyUserControl2 = new MyUserControl();  
  newMyUserControl2.size.Width = 200;
  </code></pre>
  
  <p>What sometimes happen though is the new value set by me right after creating the new instance of control seem to get ignored.<BR>
  My only explanation is, that since my UserControl is designed in Designer, all its default properties are in fact kept serialised in .resx file (?). When I create new instance in runtime, a deserialisation is started in separate thread (I have no control of). When I set some of the properties accidentaly before they get deserialised, my value gets overwriten by the ser'd value right after.
  I didn't find any info about how the creation of Designer-created controls work, so this is of course just my guess.</p>
  
  <p><strong>My question is, how to get around it ?</strong> Possibly some easy way.</p>
  
  <p><strong>The things I tried:</strong></p>
  
  <p>1- In my UserControl code:</p>
  
  <pre><code>[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
          public Size size;
  </code></pre>
  
  <p>..to remove the standard properties from Design-time serialisation.
  But (compiler says) I'm only hiding the existing standard property.
  Plus it of course doesn't work.
  I am still a beginner in c# &amp; .NET so maybe I'm just doing it wrong ?</p>
  
  <p>2- I think I can subscribe to each new control's (on)Load event, let it fully deserialize, and then set what I need. But it seems very cumbersome in code, the properties will needlessly get set twice (or more) etc.
  Basically I don't believe there isn't more elegant solution :)</p>
  
  <p>Will be glad for any advices</p>