コード例 #1
0
        /// <inheritdoc/>
        public void HandleNavigation(NavigationRequest request, IViewModel viewModel)
        {
            if (request.IsCloseRequest)
            {
                //// Do nothing - this is a close request, which is not stored in history.
            }
            if (request.Properties.LayerMode == LayerBehavior.Default)
            {
                CurrentLayer.HandleNavigation(request, viewModel);
            }
            else if (request.Properties.LayerMode == LayerBehavior.Modal)
            {
                AddLayer(true);
                CurrentLayer.HandleNavigation(request, viewModel);
            }
            else if (request.Properties.LayerMode == LayerBehavior.Shell)
            {
                CurrentLayer.HandleNavigation(request, viewModel);
                AddLayer(false);
            }
            else
            {
                throw new ArgumentException($"Request contained unknown LayerBehavior {request.Properties.LayerMode}", nameof(request));
            }

            requestStream.EmitValue(request);
        }