title: Is it necessary to unsubscribe events which are subscribed in xaml WPF, If so how to unsubscribe the events?
body: <p>Is it necessary to unsubscribe events which are subscribed in Xaml WPF??. If so how can I unsubscribe the events?? In the below code I have subscribed the MouseDown and  OnCellClosed Events in Xaml. If its really necessary to unsubscribe the events then how can I achieve this??</p>
  
  <pre><code>&lt;DataTemplate  x:Key="Style2"&gt;
       &lt;local:MyCellStyle2 MouseDown="MyCellStyle2_MouseDown" OnCellClosed="MyCellStyle2_OnCellClosed"   /&gt;
  &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>Update : 
  I am using a listBox with a itemtemplate which is defined above. Each item in the list box will be displayed with the datatemplate "MyCellStyle2". This "MyCellStyle2" control has a close button and when on clicked the object is removed from the listbox's collection but the object's mousedown and OnCellClosed events (see above) are still subscribed and which will not allow the removed item to be garbage collected. How can I overcome this. Correct me if I am wrong.</p>