title: Using button event in user control from main window
body: <p>I have wpf user control</p>
  
  <pre><code>&lt;StackPanel Orientation="Horizontal"&gt;
              &lt;TextBox Name="txbInterval" Text="5"/&gt;
              &lt;Image Name="imgStart" Source="Images/start.png"/&gt;
              &lt;Image Name="imgStop" Source="Images/stop.png"/&gt;
  &lt;/StackPanel&gt;
  </code></pre>
  
  <p>I use this control in my application many times. This control can start/stop executing tasks in my own scheduler. When imgStart is clicked, it should create new instance of some task with <code>txbInterval.Text</code> argument. I have this in my MainWindow.xaml</p>
  
  <pre><code>&lt;wp:TaskManager x:Name="tmToolsArMail"/&gt;
  &lt;wp:TaskManager x:Name="tmToolsArSail"/&gt;
  </code></pre>
  
  <p>and I need in Mainwindow.xaml.cs something like this</p>
  
  <pre><code>tmToolsArMail_imgStart_mouseUp(...)
  ... new MyTask(tmToolsArMail.txbInterval.Text) ...
  
  tmToolsArSail_imgStart_mouseUp(...)
  ... new MyAnotherTask(tmToolsArSail.txbInterval.Text) ...
  </code></pre>
  
  <p>How?</p>