コード例 #1
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            var loadData = e.NavigationMode != NavigationMode.Back;

            _viewModel  = ServiceLocator.Current.GetInstance <CategoriesViewModel>(loadData);
            DataContext = _viewModel;

            if (loadData)
            {
                await _viewModel.LoadState();
            }

            _viewModel.InstantiateHeroImageSlideShowTimer();
            UpdateSlideShowTimer();
        }