private void TabControl_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.Source is TabControl && this.IsLoaded) { TabItem selectedTab = e.AddedItems[0] as TabItem; if (selectedTab == null) { return; } if (selectedTab.Name == "AddAdminTabItem") { AddAdminFrame.Navigate(new PasswordConfirmation(LoggedAdminLogin, OnPasswordConfirmed)); } } }
private void OnPasswordConfirmed() { AddAdminFrame.Navigate(AddAdminTab); }