private void newGroup_ButtonClick(object sender, RoutedEventArgs e) { // don't need to check if it in it since we already clicked on it // gets the name of the button string name = ""; for (int i = 32; i < sender.ToString().Length; i++) { name += sender.ToString()[i]; } GlobalVariables.selectedGroup = GlobalVariables.returnGroupIDfromName(name); NavigationService navService = NavigationService.GetNavigationService(this); Group_Details nextPage = new Group_Details(); navService.Navigate(nextPage); }