This problem comes back to bite me again. I had a similar problem before but I changed the customer control to user control and define the click event in the xaml. But this time I have to stick with the customer control.
I searched the internet and there are a lot of examples but in my situation, I still got null object.
I have a CUSTOMER control which derives from treeview. The hierachicalDataTemplate for the treeview is following:
View Complete Post