title: Prevent Bubbling of Event C#
body: <p>Suppose I have an event <code>KeyPress</code> subscribed to by various classes. Assume that Class A also subscribes to <code>KeyPress</code> on the form and Class B also subscribes to <code>KeyPress</code></p>
  
  <p>Now I wish that only one of these classes should handle the event fired by the Form in runtime. That is let's say Class A handles first, I have tried using <code>e.Handled = true</code> but that is not helping in this case.</p>
  
  <p>I do not want class B to handle the event fired from the form if class A has handled already, I have a work around currently which involves setting some public flags within A and B, but that is not a good idea from software engineering principle, I want the classes to be as independent of each other as possible but at the same time, should know that an event has already been handled and does not need to be handled again.</p>
  
  <p>Is that possible?</p>
  
  <p><strong>Yes it's possible, need to check for <code>e.Handled == true</code> and .NET takes care of the rest  :-)</strong></p>