How to add event handler to the tab of a TabItem?

Posted 05 February 2013 - 08:23 AM

I am trying to add an event to allow someone to change the header on a tab item. When someone hits New from the file menu, I want the program to add a new tab with a default header. They can then click the header and change the name. I have a function that calls a dialog box that allows them to enter then new name. My question is, how do I assign the new function to the mouse click event on the tab of the TabItem?

Re: How to add event handler to the tab of a TabItem?

Posted 05 February 2013 - 10:44 AM

I have it working now. My code is below. Apparently, it did not like the single click event being assigned, which makes sense when you think about the single click event is already assigned to the selection of a tab. To change it (which would have been crazy!) I think I would have needed to override the event handler.