title: How do I can call event from usercontrol to main form
body: <p>I have a userControl and I've a button there, I'd like to call event when I'm clicking on the button in my main form from userControl. I do this:</p>
  
  <p>UserControl</p>
  
  <pre><code>public UserControlerConstructor()
  {
      _button.Click += new EventHandler(OnButtonClicked);
  }
  
  public delegate void ButtonClickedEventHandler(object sender, EventArgs e);
  public event ButtonClickedEventHandler OnUserControlButtonClicked;
  
  private void OnButtonClicked(object sender, EventArgs e)
  {
      // Delegate the event to the caller
      if (OnUserControlButtonClicked != null)
          OnUserControlButtonClicked(this, e);
  }
  </code></pre>
  
  <p>Form</p>
  
  <pre><code>public Form1()
  {            
      userControlInstance.OnUserControlButtonClicked += new EventHandler(OnUCButtonClicked);
  }
  
  private void OnUCButtonClicked(object sender, EventArgs e)
  {
      throw new NotImplementedException();
  }
  </code></pre>
  
  <p>It doesn't work because when I click in the form do nothing in the form code, but it does in userControl code. But I'd like to do in form code. I don't know how to call event from userControl to the form.</p>