private async void AddNewLocation_Click(object sender, RoutedEventArgs e) { var newLocation = new NewLocation { Name = LocationName.Text, Longitude = Convert.ToSingle(Longitude.Text), Latitude = Convert.ToSingle(Latitude.Text), IsFree = IsFree.IsOn, Male = IsForMale.IsOn, Female = IsForFemale.IsOn, IsAnonymous = IsAnonymous.IsOn }; ProgressRingGrid.Visibility = Visibility.Visible; CommandBar.Visibility = Visibility.Collapsed; await Requests.AddLocation(newLocation); ProgressRingGrid.Visibility = Visibility.Collapsed; if (Frame.CanGoBack) { Frame.GoBack(); } }