コード例 #1
0
        private void DoNavigation(NavigableUserControl control)
        {
            _currentControl = control;
            _currentControl.NavigationService = this;

            var args = new NavigatingEventArgs(_currentControl);

            Navigated?.Invoke(this, args);
        }
コード例 #2
0
        public void Navigate(NavigableUserControl control)
        {
            // Add the current control to the back stack for going backwards in history.
            if (_currentControl != null)
            {
                _backStack.Push(_currentControl);
                OnPropertyChanged(nameof(CanGoBack));
            }

            // Clear out forward stack because "normal" navigation blows away existing forward history (new "branch").
            _fontStack.Clear();
            OnPropertyChanged(nameof(CanGoForward));

            DoNavigation(control);
        }
コード例 #3
0
 public void SetCurrent(NavigableUserControl control)
 {
     _currentControl = control;
 }
コード例 #4
0
 public NavigatingEventArgs(NavigableUserControl control)
 {
     Control = control;
 }