title: Set an AutomationProperties.AutomationId in code behind
body: <p>I have a WPF application that has a few legacy panels that were written mostly with code behind.  I need to set the AutomationProperties.AutomationId for the controls on the panel.  For example, this Checkbox</p>
  
  <pre><code>CheckBox myCheckbox = new CheckBox();
  </code></pre>
  
  <p>How can I set AutomationProperties.AutomationId?</p>