发生XamlParseException

编程入门 行业动态 更新时间:2024-10-26 07:38:29
本文介绍了发生XamlParseException - 未实现方法或操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我是WPF的新手,当我使用MVVM和Prism编写我的第一个WPF应用程序时,遇到异常,异常发生在以下代码中:

I'am a newer to WPF, when i use MVVM and Prism to write my first WPF application, i meet an exception, the exception happend from the below code:

的xmlns:I =" HTTP://schemas.microsoft/expression/2010/interactivity" xmlns:ei = schemas.microsoft/expression / 2010 / interaction

xmlns:i="schemas.microsoft/expression/2010/interactivity" xmlns:ei=schemas.microsoft/expression/2010/interactions

< Button Command =" {Binding}"含量="登录" Grid.Row = QUOT 1 QUOT; IsEnabled =" {Binding Path = IsLoginButtonEnabled}"> < i:Interaction.Triggers> < i:EventTrigger EventName =" Click"> ; $ < ei:CallMethodAction TargetObject =" {Binding}"方法名= QUOT;为LoginEvent" /> - 此行有一个异常"发生了XamlParseException"该方法或操作未实施。 < / i:EventTrigger> < / i:Interaction.Triggers> < / Button>

<Button Command="{Binding }" Content="Login" Grid.Row="1" IsEnabled="{Binding Path=IsLoginButtonEnabled}"> <i:Interaction.Triggers> <i:EventTrigger EventName="Click"> <ei:CallMethodAction TargetObject="{Binding}" MethodName="LoginEvent"/> -- This line have an exception "XamlParseException occurred" The method or operation is not implemented. </i:EventTrigger> </i:Interaction.Triggers> </Button>

我使用Prism和MEF将viewmodel注入此视图,并使用"LoginEvent"和"LoginEvent"。存在于viewmodel类中LoginViewModel

I use Prism and MEF to inject viewmodel to this view, and the "LoginEvent" is exists in viewmodel class LoginViewModel

public void Login() { //无事可做。

public void Login() { //Nothing to do.

}

非常奇怪的是,我甚至无法使用try ... catch ...在LoginView.cs文件中捕获此异常:

the very strange thing is that i can not even use try ... catch... to catch this exception like this in the LoginView.cs file:

尝试 {

InitializeComponent(); } catch(例外e) {

InitializeComponent(); } catch (Exception e) {

}

以前有没有人见过这个,等你的帮助!!!!

Is there anybody met this before, waitting for your help!!!!

推荐答案

您好Itigoo,

Hi Itigoo,

因为您的问题是关于Expression SDK ,我已将此主题移至Expression Forum以获得更好的支持。

Since you question is about Expression SDK, I have moved this thread to Expression Forum for better support.

祝你好运,

更多推荐

发生XamlParseException

本文发布于:2023-11-14 19:08:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1588285.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:发生   XamlParseException

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!