当前位置: 首页>>代码示例>>C#>>正文


C# INavigationManager.Navigate方法代码示例

本文整理汇总了C#中INavigationManager.Navigate方法的典型用法代码示例。如果您正苦于以下问题:C# INavigationManager.Navigate方法的具体用法?C# INavigationManager.Navigate怎么用?C# INavigationManager.Navigate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在INavigationManager的用法示例。


在下文中一共展示了INavigationManager.Navigate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TreeCatalogViewModel

        public TreeCatalogViewModel(
            IViewModelsFactory<ICatalogViewModel> vmFactory,
            catalogModel.Catalog item,
            IRepositoryFactory<ICatalogRepository> repositoryFactory,
            IAuthenticationContext authContext,
            INavigationManager navigationManager,
            IViewModelsFactory<ICatalogDeleteViewModel> catalogDeleteVmFactory,
            IViewModelsFactory<ITreeCategoryViewModel> treeCategoryVmFactory,
            IDataManagementService exportService)
            : base(repositoryFactory, authContext)
        {
            InnerItem = item;
            EmbeddedHierarchyEntry = this;

            _catalogDeleteVmFactory = catalogDeleteVmFactory;
            _treeCategoryVmFactory = treeCategoryVmFactory;
            _exportService = exportService;

            OpenItemCommand = new DelegateCommand(() =>
            {
                if (NavigationData == null)
                {
                    var editVM = vmFactory.GetViewModelInstance(new KeyValuePair<string, object>("item", InnerItem)
                        , new KeyValuePair<string, object>("parentTreeVM", this));
                    NavigationData = ((IClosable)editVM).NavigationData;
                }
                navigationManager.Navigate(NavigationData);
            });

            ExportItemCommand = new DelegateCommand(() => RaiseExportItemCommand());
        }
开发者ID:gitter-badger,项目名称:vc-community-1.x,代码行数:31,代码来源:TreeCatalogViewModel.cs

示例2: TreeVirtualCatalogViewModel

		public TreeVirtualCatalogViewModel(
			IViewModelsFactory<ITreeCategoryViewModel> vmFactory,
			IViewModelsFactory<IVirtualCatalogViewModel> virtualCatalogVmFactory,
			IViewModelsFactory<ICatalogDeleteViewModel> catalogDeleteVmFactory,
			CatalogBase item,
			IRepositoryFactory<ICatalogRepository> repositoryFactory,
			IAuthenticationContext authContext,
			INavigationManager navigationManager)
			: base(repositoryFactory, authContext)
		{
			InnerItem = item;
			_vmFactory = vmFactory;
			_catalogDeleteVmFactory = catalogDeleteVmFactory;
			EmbeddedHierarchyEntry = this;
			ViewTitle = new ViewTitleBase
				{
					SubTitle = "VIRTUAL CATALOG",
					Title = (item != null && !string.IsNullOrEmpty(item.Name)) ? item.Name : ""
				};

			OpenItemCommand = new DelegateCommand(() =>
			{
				if (NavigationData == null)
				{
					var editVM = virtualCatalogVmFactory.GetViewModelInstance(new KeyValuePair<string, object>("item", InnerItem)
						, new KeyValuePair<string, object>("parentTreeVM", this));
					NavigationData = ((IClosable)editVM).NavigationData;
				}
				navigationManager.Navigate(NavigationData);
			});
		}
开发者ID:karpinskiy,项目名称:vc-community,代码行数:31,代码来源:TreeVirtualCatalogViewModel.cs

示例3: TreeCategoryViewModel

        public TreeCategoryViewModel(
            CategoryBase item,
            IRepositoryFactory<IAppConfigRepository> seoRepositoryFactory,
            IRepositoryFactory<ICatalogRepository> repositoryFactory,
            IViewModelsFactory<ICategoryViewModel> categoryVmFactory,
            IViewModelsFactory<ILinkedCategoryViewModel> linkedCategoryVmFactory,
            IViewModelsFactory<ITreeCategoryViewModel> treeCategoryVmFactory,
            IAuthenticationContext authContext,
            INavigationManager navigationManager)
            : base(repositoryFactory, authContext)
        {
            _treeCategoryVmFactory = treeCategoryVmFactory;
            _seoRepositoryFactory = seoRepositoryFactory;

            InnerItem = item;
            EmbeddedHierarchyEntry = this;
            ViewTitle = new ViewTitleBase
            {
                Title = "Category",
                SubTitle = GetDisplayName(item).ToUpper(CultureInfo.InvariantCulture)
            };

            PriorityChangeCommand = new DelegateCommand<string>(RaisePriorityChangeInteractionRequest);

            OpenItemCommand = new DelegateCommand(() =>
            {
                if (NavigationData == null)
                {
                    var param = new KeyValuePair<string, object>("item", InnerItem);
                    IViewModel editVM;
                    if (InnerItem is Category)
                        editVM = categoryVmFactory.GetViewModelInstance(param, new KeyValuePair<string, object>("parentTreeVM", this));
                    else
                        editVM = linkedCategoryVmFactory.GetViewModelInstance(param);

                    NavigationData = ((IClosable)editVM).NavigationData;
                }
                navigationManager.Navigate(NavigationData);
            });
        }
开发者ID:gitter-badger,项目名称:vc-community-1.x,代码行数:40,代码来源:TreeCategoryViewModel.cs


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