Function to run when the tab is left.
from is always this tab, to is where the user is going; type INavigationBarTab.
Function to run when the tab is left.