• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Regions.NavigationContext类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Microsoft.Practices.Prism.Regions.NavigationContext的典型用法代码示例。如果您正苦于以下问题:C# NavigationContext类的具体用法?C# NavigationContext怎么用?C# NavigationContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NavigationContext类属于Microsoft.Practices.Prism.Regions命名空间,在下文中一共展示了NavigationContext类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: WhenViewExistsAndDoesNotImplementINavigationAware_ThenReturnsView

        public void WhenViewExistsAndDoesNotImplementINavigationAware_ThenReturnsView()
        {
            // Arrange

            var serviceLocatorMock = new Mock<IServiceLocator>();

            var region = new Region();

            var view = new TestView();

            region.Add(view);

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

            var navigationTargetHandler = new TestRegionNavigationContentLoader(serviceLocatorMock.Object);


            // Act

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


            // Assert

            Assert.AreSame(view, returnedView);
        }
开发者ID:selvendiranj,项目名称:compositewpf-copy,代码行数:26,代码来源:LocatorNavigationTargetHandlerFixture.cs


示例17: OnNavigatedTo

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

            if (ViewModel == null)
            {
                collapseableGrid.Visibility = System.Windows.Visibility.Collapsed;
                collapseableButtonGrid.Visibility = System.Windows.Visibility.Collapsed;
                return;
            }
            else
            {
                Binding binding = new Binding();
                binding.Path = new PropertyPath("IsEnabled");
                binding.Converter = new BooleanToVisibilityConverter();
                binding.Source = ViewModel;  

                BindingOperations.SetBinding(collapseableButtonGrid, Grid.VisibilityProperty, binding);

                binding = new Binding();
                binding.Path = new PropertyPath("IsVisible");
                binding.Converter = new BooleanToVisibilityConverter();
                binding.Source = ViewModel;

                BindingOperations.SetBinding(collapseableGrid, Grid.VisibilityProperty, binding); 

            }

            if (ViewModel.IsEnabled == false) return;
                                       
            ViewModel.MediaStateCollectionView.Cleared += MediaStateCollectionView_Cleared;
            ViewModel.OnNavigatedTo(navigationContext);   
            
        }
开发者ID:iejeecee,项目名称:mediaviewer,代码行数:35,代码来源:MediaFileStackPanelView.xaml.cs


示例18: OnNavigatedFrom

 public void OnNavigatedFrom(NavigationContext navigationContext)
 {
     if (ViewModel != null)
     {
         ViewModel.MediaStateCollectionView.Cleared -= MediaStateCollectionView_Cleared;
         ViewModel.OnNavigatedFrom(navigationContext);
     }
 }
开发者ID:iejeecee,项目名称:mediaviewer,代码行数:8,代码来源:MediaFileStackPanelView.xaml.cs


示例19: IsNavigationTarget

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

            // Check the ID of the currently displayed item against the ID navigation parameter.
            string id = navigationContext.Parameters["ID"];
            return CurrentItem == null ? false : CurrentItem.Id.Equals( id );
        }
开发者ID:smbdieng,项目名称:.net-examples,代码行数:8,代码来源:EditViewModel.cs


示例20: ConfirmNavigationRequest

		public void ConfirmNavigationRequest(NavigationContext navigationContext, Action<bool> continuationCallback)
		{
			bool result = true;
			
			// TODO: Implement code to set result ...
			
			continuationCallback(result);
		}
开发者ID:miseeger,项目名称:SharpDevelop.Templates,代码行数:8,代码来源:ViewModel1.cs



注:本文中的Microsoft.Practices.Prism.Regions.NavigationContext类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Regions.Region类代码示例发布时间:2022-05-26
下一篇:
C# Modularity.ModuleInfo类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap