Testing.ItemDetailPage.LoadState C# (CSharp) Метод

LoadState() защищенный Метод

Populates the page with content passed during navigation. Any saved state is also provided when recreating a page from a prior session.
protected LoadState ( Object navigationParameter, Object>.Dictionary pageState ) : void
navigationParameter Object The parameter value passed to /// when this page was initially requested. ///
pageState Object>.Dictionary A dictionary of state preserved by this page during an earlier /// session. This will be null the first time a page is visited.
Результат void
        protected override void LoadState(Object navigationParameter, Dictionary<String, Object> pageState)
        {
            // Allow saved page state to override the initial item to display
            if (pageState != null && pageState.ContainsKey("SelectedItem"))
            {
                navigationParameter = pageState["SelectedItem"];
            }

            // TODO: Create an appropriate data model for your problem domain to replace the sample data
            var item = SampleDataSource.GetItem((String)navigationParameter);
            this.DefaultViewModel["Group"] = item.Group;
            this.DefaultViewModel["Items"] = item.Group.Items;
            this.flipView.SelectedItem = item;
        }