private void OnAfterNavigationEvent(AfterNavigationEventArgs args) { CurrentViewModel = args.ViewModel; IsHambugerMenuOpen = args.IsHamburgerMenuOpen; OnVisibleMenu(args.IsMenuVisible); }
public void ShouldHideMenuWhenTheNavigationEventIsCalled() { var args = new AfterNavigationEventArgs() { IsMenuVisible = false }; _afterNavigationEvent.Publish(args); Assert.AreEqual(Visibility.Collapsed, _viewModel.MenuVisibility); }
public void ShouldCloseTheMenuWhenTheNavigationEventIsCalled() { _viewModel.IsHambugerMenuOpen = true; var args = new AfterNavigationEventArgs() { IsHamburgerMenuOpen = false, }; _afterNavigationEvent.Publish(args); Assert.IsFalse(_viewModel.IsHambugerMenuOpen); }
private void OnAfterNavigationEnvet(AfterNavigationEventArgs args) { IsHambugerMenuOpen = args.IsHamburgerMenuOpen; CurrentViewModel = args.ViewModel; MenuVisibility = args.IsMenuVisible ? Visibility.Visible : Visibility.Collapsed; }