예제 #1
0
        private void OnAfterNavigationEvent(AfterNavigationEventArgs args)
        {
            CurrentViewModel = args.ViewModel;

            IsHambugerMenuOpen = args.IsHamburgerMenuOpen;

            OnVisibleMenu(args.IsMenuVisible);
        }
예제 #2
0
        public void ShouldHideMenuWhenTheNavigationEventIsCalled()
        {
            var args = new AfterNavigationEventArgs()
            {
                IsMenuVisible = false
            };

            _afterNavigationEvent.Publish(args);

            Assert.AreEqual(Visibility.Collapsed, _viewModel.MenuVisibility);
        }
예제 #3
0
        public void ShouldCloseTheMenuWhenTheNavigationEventIsCalled()
        {
            _viewModel.IsHambugerMenuOpen = true;

            var args = new AfterNavigationEventArgs()
            {
                IsHamburgerMenuOpen = false,
            };

            _afterNavigationEvent.Publish(args);

            Assert.IsFalse(_viewModel.IsHambugerMenuOpen);
        }
예제 #4
0
 private void OnAfterNavigationEnvet(AfterNavigationEventArgs args)
 {
     IsHambugerMenuOpen = args.IsHamburgerMenuOpen;
     CurrentViewModel   = args.ViewModel;
     MenuVisibility     = args.IsMenuVisible ? Visibility.Visible : Visibility.Collapsed;
 }