public void Activated(object sender, ActivatedDataEventArgs e) { // Restoring from tombstoning base.OnNavigatedTo(e); if (!e.ClearData) { object context = null; if (Configuration.TryLoadStateSetting<object>("DataContext", out context)) { DataContext = context; } _loadedHandler = new RoutedEventHandler((innerSender, args) => { double vscroll = 0; if (Configuration.TryLoadStateSetting<double>("VScrollPosition", out vscroll)) { //System.Diagnostics.Debug.WriteLine("VOffset: " + vscroll); ListBoxOne.SetVerticalScrollOffset(vscroll); Loaded -= _loadedHandler; } }); Loaded += _loadedHandler; } }
public void Activated(object sender, ActivatedDataEventArgs e) { if (!e.ClearData) { int pivotIndex = 0; if (Configuration.TryLoadStateSetting<int>("SelectedPivot", out pivotIndex)) { pivot.SelectedItem = pivot.Items[pivotIndex]; } if (pivot.SelectedItem != null && pivot.SelectedItem is PivotItem) { PivotItem selectedItem = (PivotItem)pivot.SelectedItem; if (selectedItem.Content != null && selectedItem.Content is NavigationPanel) { ((NavigationPanel)selectedItem.Content).Activated(sender, e); } } } }
public override void Activated(object sender, ActivatedDataEventArgs e) { base.Activated(sender, e); object context = null; if (Configuration.TryLoadStateSetting<object>("DataContext", out context)) { DataContext = context; } _loadedHandler = new RoutedEventHandler((innerSender, args) => { double vscroll = 0; if (Configuration.TryLoadStateSetting<double>("VScrollPosition", out vscroll)) { Debug.WriteLine("VOffset: " + vscroll); albumList.SetVerticalScrollOffset(vscroll); Loaded -= _loadedHandler; } }); Loaded += _loadedHandler; }
public virtual void Activated(object sender, ActivatedDataEventArgs e) { }