當前位置: 首頁>>代碼示例>>C#>>正文


C# Regions.NavigationContext類代碼示例

本文整理匯總了C#中Microsoft.Practices.Prism.Regions.NavigationContext的典型用法代碼示例。如果您正苦於以下問題:C# NavigationContext類的具體用法?C# NavigationContext怎麽用?C# NavigationContext使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


NavigationContext類屬於Microsoft.Practices.Prism.Regions命名空間,在下文中一共展示了NavigationContext類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: OnNavigatedTo

 public void OnNavigatedTo(NavigationContext navigationContext)
 {
     string ParametroRecibido = navigationContext.Parameters["TheText"];
     // ReceptionTextBox.Text = ParametroRecibido; // este codigo es para una implantación con codebehinde
     RecepcionDato = ParametroRecibido;
     System.Windows.MessageBox.Show(String.Format("El parametro recibido es :/{0}/", ParametroRecibido));
 }
開發者ID:llenroc,項目名稱:Inflexion2,代碼行數:7,代碼來源:ModuleAWorkSpaceViewModel2.cs

示例2: OnNavigatedTo

        public void OnNavigatedTo(NavigationContext navigationContext)
        {
            ViewModel = (MediaFileBrowserImagePanelViewModel)navigationContext.Parameters["viewModel"];
            DataContext = ViewModel;

            ViewModel.OnNavigatedTo(navigationContext);
        }
開發者ID:iejeecee,項目名稱:mediaviewer,代碼行數:7,代碼來源:MediaFileBrowserImagePanelView.xaml.cs

示例3: OnNavigatedTo

        public void OnNavigatedTo(NavigationContext navigationContext)
        {
            menu = new RTIMainView();
            menu.AboutButton.Command = aboutCommand;

            ribbonService.AddRibbonItem(menu, true);
        }
開發者ID:mahdimousavi,項目名稱:DarkStorm-Desktop,代碼行數:7,代碼來源:MainVM.cs

示例4: OnNavigatedTo

 /// <summary>
 /// 當前的頁麵被導航到以後發生,這個函數可以用來處理URI的參數
 /// </summary>
 /// <param name="navigationContext"></param>
 public void OnNavigatedTo(NavigationContext navigationContext)
 {
     if (TagMsg == null || TagMsg == "")
     {
         TagMsg = "密碼";
     }
 }
開發者ID:wybq68,項目名稱:DIH_LUMBARROBAT,代碼行數:11,代碼來源:LoginViewModel.cs

示例5: OnNavigatedFrom

 public void OnNavigatedFrom(NavigationContext navigationContext)
 {
     foreach (var tabItem in _tabs)
     {
         tabItem.ViewModel.Deinitialize(navigationContext);
     }
 }
開發者ID:kms,項目名稱:torshify-client,代碼行數:7,代碼來源:ArtistViewModel.cs

示例6: OnNavigatedTo

 public void OnNavigatedTo(NavigationContext navigationContext)
 {
     if (navigationContext.Parameters != null && navigationContext.Parameters.Any())
     {
         var id = (int?) navigationContext.Parameters["Id"];
         if (id.HasValue)
         {
             ViewModel = new DishViewModel(id.Value)
             {
                 Repository = Repository
             };
         }
         else
         {
             ViewModel = new DishViewModel
             {
                 Repository = Repository
             };
         }
     }
     else
         ViewModel = new DishViewModel
         {
             Repository = Repository
         };
 }
開發者ID:saaleksandrov,項目名稱:SuChief,代碼行數:26,代碼來源:AddDishView.xaml.cs

示例7: RaiseNavigating

 private void RaiseNavigating(NavigationContext navigationContext)
 {
     if (this.Navigating != null)
     {
         this.Navigating(this, new RegionNavigationEventArgs(navigationContext));
     }
 }
開發者ID:xperiandri,項目名稱:PortablePrism,代碼行數:7,代碼來源:RegionNavigationService.cs

示例8: RegionNavigationEventArgs

        /// <summary>
        /// Initializes a new instance of the <see cref="RegionNavigationEventArgs"/> class.
        /// </summary>
        /// <param name="navigationContext">The navigation context.</param>
        public RegionNavigationEventArgs(NavigationContext navigationContext)
        {
            if (navigationContext == null) throw new ArgumentNullException("navigationContext");
            Contract.EndContractBlock();

            this.NavigationContext = navigationContext;
        }
開發者ID:xperiandri,項目名稱:PortablePrism,代碼行數:11,代碼來源:RegionNavigationEventArgs.cs

示例9: IsNavigationTarget

 public bool IsNavigationTarget(NavigationContext navigationContext)
 {
     return true;
     // If you want to create multiple versions of this view then you need to set the 
     // PartCreationPolicy to NonShared and write code to determine if the view is 
     // a navigation target or not.
 }
開發者ID:modulexcite,項目名稱:PrismExample,代碼行數:7,代碼來源:ViewTwoViewModel.cs

示例10: WhenRegionHasMultipleViews_ThenViewsWithMatchingTypeNameAreConsidered

        public void WhenRegionHasMultipleViews_ThenViewsWithMatchingTypeNameAreConsidered()
        {
            // Arrange

            var serviceLocatorMock = new Mock<IServiceLocator>();

            var region = new Region();

            var view1 = new TestView();
            var view2 = "view";

            region.Add(view1);
            region.Add(view2);

            var navigationContext = new NavigationContext(null, new Uri(view2.GetType().Name, UriKind.Relative));

            var navigationTargetHandler = new TestRegionNavigationContentLoader(serviceLocatorMock.Object);


            // Act

            var returnedView = navigationTargetHandler.LoadContent(region, navigationContext);


            // Assert

            Assert.AreSame(view2, returnedView);
        }
開發者ID:selvendiranj,項目名稱:compositewpf-copy,代碼行數:28,代碼來源:LocatorNavigationTargetHandlerFixture.cs

示例11: OnNavigatedTo

        public void OnNavigatedTo(NavigationContext navigationContext)
        {
            ViewModel = (ImageViewModel)navigationContext.Parameters["viewModel"];
            DataContext = ViewModel;

            ViewModel.OnNavigatedTo(navigationContext);              
        }       
開發者ID:iejeecee,項目名稱:mediaviewer,代碼行數:7,代碼來源:ImageView.xaml.cs

示例12: IsNavigationTarget

        public bool IsNavigationTarget( NavigationContext navigationContext )
        {
            // Called to see if this view can handle the navigation request. If it can, this view is activated.

            // This view is always the navigation target so return true.
            return true;
        }
開發者ID:smbdieng,項目名稱:.net-examples,代碼行數:7,代碼來源:DetailsViewModel.cs

示例13: OnNavigatedTo

        public void OnNavigatedTo(NavigationContext navigationContext)
        {
            if (navigationContext.Parameters != null && navigationContext.Parameters.Any())
            {
                var dishes = navigationContext.Parameters["Dishes"] as List<DishViewModel>;

                if (dishes != null)
                    ViewModel = new OrderViewModel(dishes)
                    {
                        Repository = Repository,
                        NavigationService = navigationContext.NavigationService
                    };
                else
                    ViewModel = new OrderViewModel
                    {
                        Repository = Repository,
                        NavigationService = navigationContext.NavigationService
                    };

            }
            else
                ViewModel = new OrderViewModel
                {
                    Repository = Repository,
                    NavigationService = navigationContext.NavigationService
                };
        }
開發者ID:saaleksandrov,項目名稱:SuChief,代碼行數:27,代碼來源:OrderView.xaml.cs

示例14: OnNavigatedTo

        public void OnNavigatedTo(NavigationContext navigationContext)
        {
            _trackMenuBarToken = _eventAggregator.GetEvent<TrackCommandBarEvent>().Subscribe(OnTrackMenuBarEvent, true);
            _tracksMenuBarToken = _eventAggregator.GetEvent<TracksCommandBarEvent>().Subscribe(OnTracksMenuBarEvent, true);

            Album = navigationContext.Tag as IAlbum;
        }
開發者ID:kms,項目名稱:torshify-client,代碼行數:7,代碼來源:AlbumViewModel.cs

示例15: OnNavigatedTo

        public void OnNavigatedTo(NavigationContext navigationContext)
        {
            ViewModel = (GeotagFileBrowserViewModel)navigationContext.Parameters["viewModel"];
            DataContext = ViewModel;

            ViewModel.OnNavigatedTo(navigationContext);   
        }
開發者ID:iejeecee,項目名稱:mediaviewer,代碼行數:7,代碼來源:GeotagFileBrowserView.xaml.cs


注:本文中的Microsoft.Practices.Prism.Regions.NavigationContext類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。