private void F_Navigated(object sender, NavigationEventArgs e) { //pretty ugly. Worth to recode it. if (f.CanGoBack) { BackBut.Visibility = Visibility.Visible; HamBut.Visibility = Visibility.Collapsed; AddCollection.SetValue(RelativePanel.BelowProperty, BackBut); AddCollection.SetValue(RelativePanel.AlignRightWithProperty, BackBut); } else { BackBut.Visibility = Visibility.Collapsed; HamBut.Visibility = Visibility.Visible; AddCollection.SetValue(RelativePanel.BelowProperty, HamBut); AddCollection.SetValue(RelativePanel.AlignRightWithProperty, HamBut); } }