title: Should I create a new method to handle the event or override the base method?
body: <p>I'm using a class derived from <code>UIElement</code> class when writing a UWP program using C#, where I want to include handling input controls such as mouse and keyboard actions. Now I see there are already virtual methods that says <code>OnSomeEvent()</code> and clearly I can <strong>override these method</strong> to fit my handling process, or I can <strong>create new method</strong> handling the public events defined in the base class, and subscribe them to these input events in the constructor. I assume these two methods both work but <strong>I hope to know which is more professional or more advisable way of doing this, and why. Also it would help to explain why MS offers these two ways at the same time.</strong></p>
  
  <p>Here's the events and methods of <code>UIElement</code> class
  <a href="https://msdn.microsoft.com/en-us/library/system.windows.uielement(v=vs.110).aspx#Examples" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/library/system.windows.uielement(v=vs.110).aspx#Examples</a></p>
  
  <p>and a paragraph of quoting </p>
  
  <blockquote>
    <p>UIElement provides a starting point for element layout
    characteristics, and also exposes virtual methods that derived classes
    can override, which can influence the layout rendering behavior of the
    element and its child elements. Much of the input and focusing
    behavior for elements in general is also defined in the UIElement
    class. This includes the events for keyboard, mouse and stylus input,
    and related status properties. Many of these events are routed events,
    and many of the input-related events have both a bubbling routing
    version as well as a tunneling version of the event. These paired
    events are typically the events of greatest interest to control
    authors. </p>
  </blockquote>