コード例 #1
0
 /// <summary>
 /// Preserves state associated with this page in case the application is suspended or the
 /// page is discarded from the navigation cache.  Values must conform to the serialization
 /// requirements of <see cref="SuspensionManager.SessionState"/>.
 /// </summary>
 /// <param name="sender">The source of the event; typically <see cref="NavigationHelper"/></param>
 /// <param name="e">Event data that provides an empty dictionary to be populated with
 /// serializable state.</param>
 private void navigationHelper_SaveState(object sender, SaveStateEventArgs e)
 {
 }
コード例 #2
0
        /// <summary>
        ///     Used to save states when leaving from the page
        /// </summary>
        private void navigationHelper_SaveState(object sender, SaveStateEventArgs e)
        {
            if (this.RoadsViewSource.View == null) return;

            e.PageState["QueryText"] = SearchBox.QueryText;
            e.PageState["UnfinishedFilterState"] = RoadListUnfinishedFilterCheckBox.IsChecked;
            e.PageState["DateFilterState"] = RoadListDateFilterCheckBox.IsChecked;
            e.PageState["DateFilterData"] = RoadListDateFilterDatePicker.Date;
            e.PageState["AllRoads"] = ViewModel.AllRoads;
        }