本文整理汇总了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());
}
示例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);
});
}
示例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);
});
}