And show a messagebox when there are unsaved changes if an user tries to close the tab. Also add an asterisk after the TabItem title if there are unsaved changes.