Exemple #1
0
        protected override void OnNavigatedFrom(NavigationEventArgs e)
        {
            base.OnNavigatedFrom(e);

            ViewModelBase viewModel = DataContext as ViewModelBase;

            if (viewModel != null)
            {
                viewModel.OnNavigatedFrom(NavigationHelper.FromArgs(e));
            }
        }
Exemple #2
0
        protected override void OnNavigatedFrom(NavigationEventArgs e)
        {
            base.OnNavigatedFrom(e);

            NavigationArgs args = NavigationHelper.FromArgs(e);
            ViewModelBase  vm   = DataContext as ViewModelBase;

            if (vm != null)
            {
                vm.OnNavigatedFrom(args);
            }
        }
Exemple #3
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            string        parameterKey = e.Parameter as string;
            ViewModelBase viewModel    = DataContext as ViewModelBase;

            if (viewModel != null)
            {
                viewModel.OnNavigatedTo(NavigationHelper.FromArgs(e), parameterKey);
            }
        }
Exemple #4
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            NavigationArgs args          = NavigationHelper.FromArgs(e);
            string         parametersKey = null;

            if (NavigationContext.QueryString.ContainsKey("key"))
            {
                parametersKey = NavigationContext.QueryString["key"];
            }
            ViewModelBase vm = DataContext as ViewModelBase;

            if (vm != null)
            {
                vm.OnNavigatedTo(args, parametersKey);
            }
        }