Esempio n. 1
0
 void RadialMenu_Navigated(object sender, NavigatedEventArgs e)
 {
     text = new TextView(con);
     text.SetTextColor(Color.Black);
     textFrame.AddView(text, 0);
     text.Text = "RadialMenu is Navigated";
 }
Esempio n. 2
0
        private void NavigationService_NavigatedToPage(object sender, NavigatedEventArgs e)
        {
            var navigatedNode = Navigation.FindPage(e.Page);

            if (navigatedNode != null)
            {
                Navigation.Active = navigatedNode;
            }
            else
            {
                Navigation.Active = null;
            }

            if (NavPanelOpened)
            {
                NavPanelOpened = false;
            }
            if (NavigationService.CanGoBack())
            {
                SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
            }
            else
            {
                SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Collapsed;
            }
            OnPropertyChanged("GoBackCommand");
        }
Esempio n. 3
0
 private void FrameFacade_Navigated(object sender, NavigatedEventArgs e)
 {
     if (_analyticsService == null)
     {
         _analyticsService = (IAnalyticsService)ServiceLocator.Current.GetService(typeof(IAnalyticsService));
     }
     _analyticsService.TrackPageView(e.PageType.Name);
 }
 protected virtual void OnNavigationCompleted(NavigatedEventArgs e)
 {
     if (Navigated != null)
     {
         Navigated(this, e);
     }
     TransitionToNavigationState(Controls.NavigationState.Navigated);
 }
Esempio n. 5
0
        protected virtual void OnScoreboardNavigated(NavigatedEventArgs e)
        {
            EventHandler <NavigatedEventArgs> handler = ScoreboardNavigate;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Esempio n. 6
0
        internal void NavigateInternal(NavigationType navigationType, object navigationData)
        {
            var args = new NavigatedEventArgs()
            {
                Data = navigationData, NavigationType = navigationType
            };

            OnScoreboardNavigated(args);
            ScoreboardNavigated(args);
        }
        /// <summary>
        /// Pass the navigation event further.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="eventargs"></param>
        private void Navigator_Navigated(object sender, NavigatedEventArgs eventargs)
        {
            if (Navigated != null)
            {
                Navigated(sender, eventargs);
            }

            OnPropertyChanged("CanMoveForward");
            OnPropertyChanged("CanMoveBackward");
            OnPropertyChanged("CurrentPageIndex");
        }
        protected virtual void OnNavigationCompleted(NavigatedEventArgs e)
        {
            // we raise the event
            if (Navigated != null)
            {
                Navigated(this, e);
            }

            // and indicate the visual state
            TransitionToNavigationState(NavigationState.Navigated, true);
        }
 void RadialMenu_Navigated(object sender, NavigatedEventArgs e)
 {
     if (textFrame.ChildCount == 10)
     {
         textFrame.RemoveView(textFrame.GetChildAt(10));
     }
     text = new TextView(con);
     text.SetTextColor(Color.Black);
     textFrame.AddView(text, 0);
     text.Text = "RadialMenu is Navigated";
     scrollviewer.ScrollTo(textFrame.Bottom, 0);
 }
Esempio n. 10
0
        /// <summary>
        /// Called when the control has just been navigated to the page.
        /// </summary>
        /// <param name="e">The <see cref="NavigatedEventArgs" /> instance containing the event data.</param>
        protected virtual void OnNavigatedToPage(NavigatedEventArgs e)
        {
            EnsureViewModel();

            var viewModelAsViewModelBase = ViewModel as ViewModelBase;

            if (viewModelAsViewModelBase != null)
            {
                var navigationContext = _navigationAdapter.NavigationContext;
                viewModelAsViewModelBase.UpdateNavigationContext(navigationContext);
            }
        }
Esempio n. 11
0
 private void OnNavigated(object sender, NavigatedEventArgs e)
 {
     // sync menu item selection
     if (e.NavigationType == NavigationType.Back)
     {
         var pageName = e.SourceType.Name;
         var menuItem = MenuItemsSource.Items.FirstOrDefault(m => m.Tag == pageName);
         if (menuItem != null)
         {
             this.MenuItemsSource.SuspendNotifications();
             MenuItemsSource.SelectedItem = menuItem;
             this.MenuItemsSource.ResumeNotifications();
         }
     }
 }
Esempio n. 12
0
        /// <summary>
        /// Called when the control has just been navigated to the page.
        /// </summary>
        /// <param name="e">The <see cref="NavigatedEventArgs" /> instance containing the event data.</param>
        protected virtual void OnNavigatedToPage(NavigatedEventArgs e)
        {
            if (ViewModelLifetimeManagement != ViewModelLifetimeManagement.FullyManual)
            {
                EnsureViewModel();
            }
            else
            {
                Log.Debug($"View model lifetime management is set to '{ViewModelLifetimeManagement}', not creating view model on navigation event for '{TargetViewType?.Name}'");
            }

            var viewModelAsViewModelBase = ViewModel as ViewModelBase;

            if (viewModelAsViewModelBase != null)
            {
                var navigationContext = _navigationAdapter.NavigationContext;
                viewModelAsViewModelBase.UpdateNavigationContext(navigationContext);
            }
        }
        public void DispatcherShouldNotifyAboutNavigatedEvent()
        {
            var navigationDispatcher = CreateNavigationDispatcher();
            var vmFrom = GetViewModel <NavigableViewModelMock>();
            var vmTo   = GetViewModel <NavigableViewModelMock>();

            NavigatedEventArgs eventArgs = null;

            navigationDispatcher.Navigated += (sender, args) =>
            {
                sender.ShouldEqual(navigationDispatcher);
                eventArgs.ShouldBeNull();
                eventArgs = args;
            };

            var ctx = new NavigationContext(NavigationType.Page, NavigationMode.New, vmFrom, vmTo, this);

            navigationDispatcher.OnNavigated(ctx);
            eventArgs.Context.ShouldEqual(ctx);
        }
Esempio n. 14
0
        private void WebView_Navigated(object sender, NavigatedEventArgs e)
        {
            Control control = sender as Control;

            while (control != null)
            {
                if (control is TabPage tab)
                {
                    if (tabs.TabCount > 0 && tabs.SelectedTab == tab)
                    {
                        txtAddress.Text = e.Url;
                    }
                    return;
                }
                else
                {
                    control = control.Parent;
                }
            }
        }
Esempio n. 15
0
 void UpdateButtons(NavigatedEventArgs e)
 {
     UpdateButtons(e.PageType);
 }
Esempio n. 16
0
 private void OnFrameFacadeNavigated(object sender, NavigatedEventArgs e) => Navigated?.Invoke(this, e);
 /// <summary>
 ///   Navigators the on page changed.
 /// </summary>
 /// <param name="sender"> The sender. </param>
 /// <param name="eventArgs"> The <see cref="NavigatedEventArgs" /> instance containing the event data. </param>
 private void OnNavigated(object sender, NavigatedEventArgs eventArgs)
 {
     this.OnPropertyChanged("Page");
     this.OnPropertyChanged("PageViewModel");
     this.OnPropertyChanged("Links");
 }
 private void OnNavigated(NavigatedEventArgs e)
 {
     Navigated?.Invoke(this, e);
 }
 private void RelayNavigatedEvent(object sender, NavigatedEventArgs e)
 {
     OnNavigated(e);
 }
 public void RaiseNavigated(NavigatedEventArgs args)
 {
     Navigated?.Invoke(this, args);
 }
Esempio n. 21
0
 private void OnNavigatedEvent(object sender, NavigationEventArgs e)
 {
     var eventArgs = new NavigatedEventArgs(e.Uri.ToString(), NavigationMode.Unknown);
     HandleNavigatedEvent(eventArgs);
 }
Esempio n. 22
0
 private void OnNavigatedAway(object sender, NavigatedEventArgs e)
 {
     OnNavigatedAwayFromPage(e);
 }
Esempio n. 23
0
 private void NavigationHandler(object sender, NavigatedEventArgs eventArgs)
 {
     RenderPage(eventArgs.NewPage);
 }
Esempio n. 24
0
    /// <summary>
    /// Sets up the UI after the ShellListView has navigated
    /// </summary>
    /// <param name="e"></param>
    private void SetupUIonNavComplete(NavigatedEventArgs e) {
      btnSizeChart.IsEnabled = e.Folder.IsFileSystem;
      btnAutosizeColls.IsEnabled = _ShellListView.View == ShellViewStyle.Details;

      if (e.Folder.ParsingName != KnownFolders.RecycleBin.ParsingName)
        miRestoreALLRB.Visibility = Visibility.Collapsed;
      else if (_ShellListView.Items.Any())
        miRestoreALLRB.Visibility = Visibility.Visible;

      bool isFuncAvail;
      int selectedItemsCount = _ShellListView.GetSelectedCount();
      if (selectedItemsCount == 1) {
        isFuncAvail = _ShellListView.GetFirstSelectedItem().IsFileSystem || _ShellListView.CurrentFolder.ParsingName == KnownFolders.Libraries.ParsingName;
      } else {
        isFuncAvail = true;
        if (!(_ShellListView.CurrentFolder.IsFolder && !_ShellListView.CurrentFolder.IsDrive && !_ShellListView.CurrentFolder.IsSearchFolder))
          ctgFolderTools.Visibility = Visibility.Collapsed;
      }

      bool IsChanged = selectedItemsCount > 0;
      btnCopy.IsEnabled = IsChanged;
      btnCut.IsEnabled = IsChanged;
      btnRename.IsEnabled = IsChanged;
      btnDelete.IsEnabled = IsChanged && isFuncAvail;
      btnCopyto.IsEnabled = IsChanged;
      btnMoveto.IsEnabled = IsChanged;
      btnSelNone.IsEnabled = IsChanged;

      leftNavBut.IsEnabled = (tcMain.SelectedItem as Wpf.Controls.TabItem).log.CanNavigateBackwards;
      rightNavBut.IsEnabled = (tcMain.SelectedItem as Wpf.Controls.TabItem).log.CanNavigateForwards;
      btnUpLevel.IsEnabled = _ShellListView.CanNavigateParent;
    }
 protected virtual void OnNavigated(NavigatedEventArgs e)
 {
     Navigated?.Invoke(this, e);
 }
Esempio n. 26
0
 protected virtual void ScoreboardNavigated(NavigatedEventArgs e)
 {
 }
 void Radial_Menu_Navigated(object sender, NavigatedEventArgs e)
 {
     list.Add("RadialMenu is Navigated");
 }
Esempio n. 28
0
 /// <summary>
 ///   Navigators the on page changed.
 /// </summary>
 /// <param name="sender"> The sender. </param>
 /// <param name="eventArgs"> The <see cref="NavigatedEventArgs" /> instance containing the event data. </param>
 private void OnNavigated(object sender, NavigatedEventArgs eventArgs)
 {
     OnPropertyChanged("Page");
     OnPropertyChanged("Links");
 }
Esempio n. 29
0
        private void NavigationService_NavigatedToPage(object sender, NavigatedEventArgs e)
        {
            var navigatedNode = Navigation.FindPage(e.Page);
            if (navigatedNode != null)
            {
                Navigation.Active = navigatedNode;
            }
            else
            {
                Navigation.Active = null;
            }

            if (NavPanelOpened)
            {
                NavPanelOpened = false;
            }
            if (NavigationService.CanGoBack())
            {
                SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
            }
            else
            {
                SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Collapsed;
            }
            OnPropertyChanged("GoBackCommand");
            RaiseSplitViewDisplayModeChanged(SplitViewDisplayMode);
        }
Esempio n. 30
0
    void ShellListView_Navigated(object sender, NavigatedEventArgs e) {
      this._ProgressTimer.Stop();
      this.btnCancelNavigation.Visibility = Visibility.Collapsed;
      this.btnGoNavigation.Visibility = Visibility.Visible;
      SetupUIOnSelectOrNavigate();

      Dispatcher.BeginInvoke(DispatcherPriority.Background, (ThreadStart)(() => {
        SetupColumnsButton();
        SetSortingAndGroupingButtons();

        if (!tcMain.isGoingBackOrForward) {
          var Current = (tcMain.SelectedItem as Wpf.Controls.TabItem).log;
          Current.ClearForwardItems();
          if (Current.CurrentLocation != e.Folder) Current.CurrentLocation = e.Folder;
        }

        tcMain.isGoingBackOrForward = false;
        SetupUIonNavComplete(e);

        if (this.IsConsoleShown)
          ctrlConsole.ChangeFolder(e.Folder.ParsingName, e.Folder.IsFileSystem);
      }));

      Dispatcher.BeginInvoke(DispatcherPriority.Background, (ThreadStart)(() => {
        ConstructMoveToCopyToMenu();
        SetUpJumpListOnNavComplete();
        SetUpButtonVisibilityOnNavComplete(SetUpNewFolderButtons());
      }));

      if (this.IsInfoPaneEnabled) {
        Task.Run(() => {
          this.DetailsPanel.FillPreviewPane(this._ShellListView);
        });
      }

      Dispatcher.Invoke(DispatcherPriority.Render, (Action)(() => {
        this._ShellListView.Focus(false, true);
        var selectedItem = this.tcMain.SelectedItem as Wpf.Controls.TabItem;
        if (selectedItem == null) {
          this.tcMain.SelectedItem = this.tcMain.Items.OfType<Wpf.Controls.TabItem>().Last();
          selectedItem = this.tcMain.SelectedItem as Wpf.Controls.TabItem;
        }
        var oldCurrentItem = selectedItem.ShellObject;
        var curentFolder = this._ShellListView.CurrentFolder.Clone();
        selectedItem.Header = this._ShellListView.CurrentFolder.DisplayName;
        selectedItem.Icon = curentFolder.ThumbnailSource(16, ShellThumbnailFormatOption.IconOnly, ShellThumbnailRetrievalOption.Default);
        selectedItem.ShellObject = this._ShellListView.CurrentFolder;
        if (selectedItem != null) {
          var selectedPaths = selectedItem.SelectedItems;
          if (selectedPaths?.Count > 0) {
            foreach (var path in selectedPaths.ToArray()) {
              var sho = this._ShellListView.Items.FirstOrDefault(w => w.ParsingName == path);
              if (sho != null) {
                var index = sho.ItemIndex;
                this._ShellListView.SelectItemByIndex(index, path.Equals(selectedPaths.Last(), StringComparison.InvariantCultureIgnoreCase) || this.IsNeedEnsureVisible);
                this.IsNeedEnsureVisible = false;
                selectedPaths.Remove(path);
              }
            }
          } else {
            var realItem = this._ShellListView.Items.ToArray().FirstOrDefault(w => w.GetUniqueID() == oldCurrentItem.GetUniqueID());
            if (realItem != null) {
              this._ShellListView.SelectItems(new[] { realItem });
            } else {
              if (!curentFolder.ParsingName.Contains(oldCurrentItem.ParsingName)) {
                var parents = new List<IListItemEx>();
                var parent = oldCurrentItem.Parent;
                while (parent != null) {
                  parents.Add(parent);
                  realItem = this._ShellListView.Items.ToArray().FirstOrDefault(w => w.GetUniqueID() == parent.GetUniqueID());
                  if (realItem != null) {
                    this._ShellListView.SelectItems(new[] { realItem });
                    break;
                  }
                  parent = parent.Parent;
                }
              }
            }

            //this._ShellListView.ScrollToTop();
          }
        }
        oldCurrentItem.Dispose();
        curentFolder.Dispose();
      }));

      ////This initially setup the statusbar after program opens
      Dispatcher.BeginInvoke(DispatcherPriority.Background, (ThreadStart)(() => {
        this.SetUpStatusBarOnSelectOrNavigate(_ShellListView.SelectedItems == null ? 0 : _ShellListView.GetSelectedCount());
      }));

      //Dispatcher.BeginInvoke(DispatcherPriority.Background, (ThreadStart) (() => {
      //    Thread.Sleep(1500);
      if (this.bcbc.ProgressValue > 2)
        this.bcbc.SetProgressValue(this.bcbc.ProgressMaximum, TimeSpan.FromMilliseconds(750));
      else
        this.bcbc.SetProgressValue(0, TimeSpan.FromSeconds(0));
      this.bcbc.ProgressMaximum = 100;
      //this.bcbc.SetProgressValue(0, TimeSpan.FromSeconds(0));
      //}));


    }
Esempio n. 31
0
 /// <summary>
 /// Called when the control has just been navigated away from the page.
 /// </summary>
 /// <param name="e">The <see cref="NavigatedEventArgs" /> instance containing the event data.</param>
 protected virtual void OnNavigatedAwayFromPage(NavigatedEventArgs e)
 {
 }
Esempio n. 32
0
 private void OnNavigatedTo(object sender, NavigatedEventArgs e)
 {
     OnNavigatedToPage(e);
 }
Esempio n. 33
0
        private void OnNavigatedEvent(object sender, NavigationEventArgs e)
        {
            // CTL-906: clear current navication context if (re) navigating to the same view
            if (e.IsNavigationForView(NavigationTargetType))
            {
                _lastNavigationContext = null;
            }

            var sourceDictionary = e.ExtraData as Dictionary<string, object>;
            if (sourceDictionary == null)
            {
                sourceDictionary = new Dictionary<string, object>();
                sourceDictionary["context"] = e.ExtraData;
            }

            _lastGlobalNavigationContext = sourceDictionary;

            var eventArgs = new NavigatedEventArgs(e.Uri.ToString(), NavigationMode.Unknown);
            HandleNavigatedEvent(eventArgs);
        }
Esempio n. 34
0
 private void WebView_Navigated(object sender, NavigatedEventArgs e)
 {
     txtAddress.Text = e.Url.ToString();
 }
 private void NavigationDispatcherOnNavigated(INavigationDispatcher sender, NavigatedEventArgs args)
 {
     RefreshOpenedViewModels();
 }