简体   繁体   English

实施mvvm light框架时,wp8 winrt pcl无法在设备上部署应用程序

[英]wp8 winrt pcl could not deploy app on device when mvvm light framework is implemented

I have a solution with a pcl, winrt and wp8 project. 我有一个pcl,winrt和wp8项目的解决方案。 I want to share the models and implement mvvm light framework. 我想共享模型并实现mvvm light框架。 It works fine, I can see the binding property in the xaml design mode, but when I deploy the app to device I get the following exception: The network connection to 127.0.0.1:8016 has been lost. 它工作正常,我可以在xaml设计模式下看到绑定属性,但是当我将应用程序部署到设备时,出现以下异常: 与127.0.0.1:8016的网络连接已丢失。 Debugging will be aborted. 调试将中止。

So when I remove the following line for initialisation the locator I can deploy, but mvvm is not implemented! 因此,当我删除以下行进行初始化时,可以部署定位器,但是未实现mvvm!

<vm:ViewModelLocator p6:Key="Locator" p7:IsDataSource="True" xmlns:p7="http://schemas.microsoft.com/expression/blend/2008" xmlns:p6="http://schemas.microsoft.com/winfx/2006/xaml" />

Has anybody an idea what is up there? 有人知道那里有什么吗?

bye Markus 再见马库斯

I usually use a simpler sintax 我通常使用更简单的sintax

<vm:ViewModelLocator xmlns:vm="clr-namespace:MultiPlatform.WP8.UI.ViewModels"
                           x:Key="Locator" />  

more info at https://github.com/cmorgado/MultiPlatform 更多信息请参见https://github.com/cmorgado/MultiPlatform

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM