I have a UserControl which contains 3 labels. I want to add an event for it, which occurs when the text of one of the labels changed. I am using Visual Studio 2010
public delegate void TextChangedEventHandler(object sender, EventArgs e); public event TextChangedEventHandler LabelTextChanged; // ... protected void MyTextBox_TextChanged(object sender, EventArgs e) { if (LabelTextChanged != null) { LabelTextChanged(this, e); } }