Ejemplo n.º 1
0
        public static void NavigateToPopUp(
            Destination destination,
            ExistingViewBehavior existingViewBehavior = ExistingViewBehavior.Remove,
            params object[] parameters)
        {
            var navigationItem = NavigationFactory.GetNavigationItem(destination);

            navigationItem.Parameters = parameters;
            var viewModel = Container.ResolveViewModel(navigationItem.ViewModelType);

            viewModel.Initialize(parameters);
            var view = Container.ResolveView(navigationItem.ViewType);

            view.DataContext            = viewModel;
            ShellView.ChildPopup.IsOpen = false;
            var resolution = Window.Current.Bounds;
            var height     = resolution.Height;
            var width      = resolution.Width;

            ShellView.ChildPopup.Child            = (UIElement)view;
            ShellView.ChildPopup.Visibility       = Visibility.Visible;
            ShellView.ChildPopup.VerticalOffset   = height - 464;
            ShellView.ChildPopup.MaxHeight        = (height / 2);
            ShellView.ChildPopup.MaxWidth         = width;
            ShellView.ChildPopup.HorizontalOffset = 0;
            ShellView.ChildPopup.IsOpen           = true;
            ShellView.UseSunGlasses(true);
        }
Ejemplo n.º 2
0
 public static void Navigate(
     Destination destination,
     ExistingViewBehavior existingViewBehavior = ExistingViewBehavior.Remove,
     params object[] parameters)
 {
     Navigate(NavigationFactory.GetNavigationItem(destination), existingViewBehavior, null, parameters);
 }