Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
        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);
                    }
                }
            }
        }
Ejemplo n.º 3
0
        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;
        }
Ejemplo n.º 4
0
 public virtual void Activated(object sender, ActivatedDataEventArgs e)
 {
 }