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封装了 ...
随机推荐
- ssh无密码访问设置(ssh-keygen 的详解)
[原文链接]http://blog.csdn.net/wh_19910525/article/details/7433164 为了让两个linux机器之间使用ssh不需要用户名和密码.所以采用了数字签 ...
- 韦东山嵌入式Linux学习笔记02--如何给开发板烧录程序
购买韦东山嵌入式开发板jz2440 v3会标配两根usb线和一根网线,OpenJtag需要单独购买, 我暂时还没买到该工具. 下面介绍usb烧录以及通过网线烧录程序. 1.usb烧录程序: 借助DNW ...
- pamamiko的学习笔记
pamamiko的学习笔记 Paramiko包含两个核心组件,一个为SSHClient类,另一个为SFTPClient类, 一,paramiko的连接有两种方式,一种是通过paramiko.SSHCl ...
- Share:《THE ULTIMATE XSS PROTECTION CHEATSHEET FOR DEVELOPERS》
Ajin Abraham(OWASP Xenotix XSS Exploit Framework的作者哦!)编写的<THE ULTIMATE XSS PROTECTION CHEATSHEET ...
- 欧拉函数 || [SDOI2008]仪仗队 || BZOJ 2190 || Luogu P2158
题面:P2158 [SDOI2008]仪仗队 题解: 显然除了(1,1),(0,1),(1,0)三个点外,对于其他点(x,y)只要满足gcd(x,y)==1就可以被看到 然后这些点是关于y=x对称的, ...
- 高性能mysql 第5章 创建高可用的索引
b-tree索引 一定程度上说,mysql只有b-tree索引.他没有bitmap索引.还有一个叫hash索引的,只在Memory存储引擎中才有. b-tree索引跟oracle中的大同小异. mys ...
- 网站实现https访问
https协议 是一种通过计算机网络进行安全通信的传输协议.HTTPS经由HTTP进行通信,但利用SSL/TLS来加密数据包.HTTPS开发的主要目的,是提供对网站服务器的身份认证,保护交换数据的隐私 ...
- 简单使用logback日志框架
logback_config.xml 配置文件信息 <?xml version="1.0" encoding="UTF-8"?> <confi ...
- 求两个数的最大公约数和最小公倍数Java(cvte考题)
//最大公约数 最小公倍数 通过测试 public class GongYue{ public static int gongyue(int m, int n) throws Exception{ i ...
- windows脚本复制文件(将u盘文件复制到固定路径)
@echo off for /f "tokens=2 delims==" %%a in ('wmic LogicalDisk where "VolumeName='Hel ...