title: How to add event handler programmatically in WPF like one can do in Winform
body: <p>What's the equivalent of this winform instruction:</p>
  
  <pre><code>this.button1.Click += new System.EventHandler(this.button1_Click);
  </code></pre>
  
  <p>in WPF ?</p>
  
  <p>Update: also for a slider. And what namespace should I declare ?</p>
  
  <p>My point is NOT to use XAML.</p>