title: WPF/C# - example for programmatically create & use Radio Buttons
body: <p>Can someone point to an example of how to programmatically create &amp; use Radio Buttons in C# WPF?</p>
  
  <p>So basically how to (a) create them programmatically, and (b) how to catch triggers when the value changes, (c) how to pick up results at a given time.  </p>
  
  <p>Will be interested to see too if the answer will be based on use of a Binding approach too.  If data binding is the easiest way to go then an example of this would be great.  Else if data binding isn't necessary the best/easiest way to go then a non-data-binding based example would be good.  </p>
  
  <p>Notes:</p>
  
  <ul>
  <li><p>Note that the parent node I have
  currently is StackPanel, so an aspect
  of the question is how to add
  multiple RadioButtons to a
  StackPanelI guess.</p></li>
  <li><p>Should point out that I won't know how many radio buttons there will be at compile time, nor what the text will be this will be discovered at run time.</p></li>
  <li><p>It is a WPF application (i.e. desktop, not a web app)</p></li>
  </ul>