WPF Prism Request Navigate activation error
其他测试项目时没有问题,但是有些项目有时候导航一直报错误!
Referring the StockTraderRI, I created a popup region in my shell
infBehaviors:RegionPopupBehaviors.CreatePopupRegionWithName="{x:Static inf:RegionNames.SecondaryRegion}"
In the module I am trying to load the view to the popup
_regionManager.RequestNavigate(RegionNames.SecondaryRegion, new Uri("/OrderDetailsView", UriKind.Relative));
OrderDetailsView is a view within OrderDetailsModule. At this point I am getting the below error
Activation error occurred while trying to get instance of type Object, key "OrderDetailsView"
Stack trace looks like below
at Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) in c:\Projects\CommonServiceLocator\main\Microsoft.Practices.ServiceLocation\ServiceLocatorImplBase.cs:line
at Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance[TService](String key) in c:\Projects\CommonServiceLocator\main\Microsoft.Practices.ServiceLocation\ServiceLocatorImplBase.cs:line
at Prism.Regions.RegionNavigationContentLoader.CreateNewRegionItem(String candidateTargetContract)
问题解决:
You must register your objects for navigation. If you are using Prism 6 you must use
Container.RegisterTypeForNavigation<OrderDetailsView>();
If using v5 or less you must use :
container.RegisterType(typeof(object), typeof(OrderDetailsView), "OrderDetailsView");
EDIT: If using MEF, you must provide the view name in the Export Attribute:
[Export("OrderDetailsView")]
public class OrderDetailsView : UserControl
{ ... }
问题解决!
http://stackoverflow.com/questions/33301926/wpf-prism-request-navigate-activation-error
https://github.com/PrismLibrary/Prism/blob/master/Documentation/WPF/60-Navigation.md#basic-region-navigation
WPF Prism Request Navigate activation error的更多相关文章
- The server instance Witness rejected configure request; read its error log file for more information. The reason 1427, and state 31, can be of use for
数据库服务器做了镜像之后,发现有错误信息 The server instance Witness rejected configure request; read its error log file ...
- WPF Prism MVVM 中 弹出新窗体. 放入用户控件
原文:WPF Prism MVVM 中 弹出新窗体. 放入用户控件 版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/qq_37214567/artic ...
- VS2015 WPF Prism Xaml Designer error
Ref: http://wiki.tk2kpdn.com/build-error-prism5-interactionrequesttrigger-with-vs2015/ gacutil -i &q ...
- WPF PRISM开发入门一( 初始化PRISM WPF程序)
这篇博客将介绍在WPF项目中引入PRISM框架进行开发的一些基础知识.目前最新的PRISM的版本是Prism 6.1.0,可以在Github上获取PRISM的源码.这个系列的博客将选择PRISM 4. ...
- WPF Prism框架下基于MVVM模式的命令、绑定、事件
Prism框架下的自定义路由事件和命令绑定 BaseCode XAML代码: <Button x:Class="IM.UI.CommandEx.PrismCommandEx" ...
- [DeploymentService:290066]Error occurred while downloading files from admin server for deployment request "0". Underlying error is: "null"
weblogic 莫名无法启动: <Apr , :: PM CST> <Error> <Deployer> <BEA-> <Failed to i ...
- [WPF+Prism]WPF个人集成平台
前段时间学习了一下Prism,感觉应该找个机会实践一下,而且前段时间,贱内(希望我老婆看不到这篇文章:))让我帮她做个定时提醒的小工具,做好之后感觉以前做了好多自己能用的小工具,如果能够整合到一起,该 ...
- 基于WPF&Prism&AvalonEdit的XAML轻量编辑器
1. 写在前面 一直从事WPF的相关开发工作,有时为了尝试或演示某些仅仅基于XAML的效果时,但又不想大动干戈打开VS去创建项目,所以一个轻便简单,集编辑与预览于一身的XAML编辑器就显得格外重要. ...
- Prism.WPF -- Prism框架使用(下)
本文参考Prism官方示例 命令使用 Prism提供了两种命令:DelegateCommand和CompositeCommand. DelegateCommand DelegateCommand封装了 ...
随机推荐
- PAT Basic 1093 字符串A+B (20 分)
给定两个字符串 A 和 B,本题要求你输出 A+B,即两个字符串的并集.要求先输出 A,再输出 B,但重复的字符必须被剔除. 输入格式: 输入在两行中分别给出 A 和 B,均为长度不超过 1的.由可见 ...
- python 教程之Django(二)
官网: https://www.djangoproject.com/download/ 1.简单方法: A.pip 命令安装方法 pip install Django 打开dos命令窗口 输入命令回车 ...
- python文件操作-1.将PDF转成Excel
# https://www.jianshu.com/p/f33233e4c712 import pdfplumber # 为了操作PDF from openpyxl import Workbook w ...
- MHA监控进程异常退出(MHA版本:0.56)
最近遇到一个非常诡异的问题,mha后台进程自己中断退出了.以下是报错:Mon Dec 21 20:16:07 2015 - [info] OK.Mon Dec 21 20:16:07 2015 - [ ...
- POJ3254Corn Fields (状态压缩or插头DP)
Description Farmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; ...
- noi.ac NA537 【Graph】
本来以为过了...然后FST了... 吐槽:nmdGraph为什么不连通... 这题想法其实非常\(na\ddot{\imath}ve\),就是对于一个连通块先钦点一个点为根,颜色是\(1\),考虑到 ...
- maven在eclipse运行命令和calss文件没有更新的问题
使用Eclipse Maven插件[Run As]-[Maven build]时并未为其指定goal或phase 解决方法: 1.使用Eclipse Maven插件[Run As]-[Maven b ...
- mybatis解析和基本运行原理
Mybatis的运行过程分为两大步: 第1步,读取配置文件缓存到Configuration对象,用于创建SqlSessionFactory: 第2步,SqlSession的执行过程.相对而言,SqlS ...
- 计算机网络(四),TCP三次握手
目录 1.三次握手详情 2.为什么需要三次握手才能建立连接 3.首次握手的隐患---SYN超时的问题 4.建立连接之后,Client出现故障 四.TCP三次握手 1.三次握手详情 (1)一开始,客户端 ...
- TTTTTTTTTTTTTTTTT CF #182 div1 B floyd
题意: 有 n(3≤n≤100) 个站点,当第一次到达站点 u 的时候会增加寿命 au(1≤au≤103),题目给了 n 个站点的二位空间坐标,每两个站点之间的距离为曼哈顿距离(dis(i, j)=| ...