Expression.Samples.Interactivity.dll问题 [英] Trouble With Expression.Samples.Interactivity.dll

查看:78
本文介绍了Expression.Samples.Interactivity.dll问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我在现有应用程序中使用MVVM模式 - 有几个项目(Silverlight 4和MS VS 2010)。我的系统中也有Blend 4.



我试图使用Expression.Samples.Interactivity探索和使用View和ViewModel之间的触发器.dll。



我在这个项目中添加了对这个程序集的引用,还在xaml页面中添加了一行:



Hi,

I am using MVVM pattern for my existing application - having a couple of projects (Silverlight 4 and MS VS 2010). Also I do have the Blend 4 in my system.

I was trying to explore and use the triggers between the View and the ViewModel, using the Expression.Samples.Interactivity.dll.

I added a reference to this assembly into my project, and also a line in the xaml page:

xmlns:ei="clr-namespace:Expression.Samples.Interactivity;assembly=Expression.Samples.Interactivity"





我没有必要为System.Windows.Interactivity.dll添加引用,因为它已经存在于我们的应用程序中。



后来在XAML代码中,我添加了以下几行:





There was no need for me to add a reference for System.Windows.Interactivity.dll, because it was already present in our application.

Later in the XAML code, I added the following lines:

<l:EventTrigger>
    <ei:CallDataMethod>

    </ei:CallDataMethod>
</l:EventTrigger>





添加这些行后,我收到以下错误消息:



错误18CallDataMethod类型的值无法添加到TriggerActionCollection类型的集合或词典中



我用Google搜索并没有找到解决这个问题的方法。



请帮助我。



谢谢,

Sruthi



After adding these lines, I got the following error message:

Error 18 A value of type 'CallDataMethod' cannot be added to a collection or dictionary of type 'TriggerActionCollection'

I googled for this and didn't find the solution to this issue.

Please help me.

Thanks,
Sruthi

推荐答案





经过数小时的研究和Google探索后,我发现由于版本问题,程序集Expression.Samples.Interactivity.dll不再适用于Silverlight 4。对于Silverlight 4,它已更新为Microsoft.Expression.Interactions.dll。甚至属性CallDataMethod也更新为CallMethodAction属性。



我删除了Expression.Samples.Interactivity.dll并添加了Microsoft.Expression.Interactions.dll作为参考。我还将以下代码更新为:



Hi,

After hours of research and exploring in Google, I came to know that the assembly "Expression.Samples.Interactivity.dll" no longer works with Silverlight 4, due to version issues. For Silverlight 4, it has been updated to "Microsoft.Expression.Interactions.dll". Even the property "CallDataMethod" was also updated to "CallMethodAction" property.

I removed the Expression.Samples.Interactivity.dll and added Microsoft.Expression.Interactions.dll as a reference. Also I updated the following code as:

xmlns:l="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:ei="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"





更新后,我能够添加以下代码,没有任何问题。此外,触发器的Intellisense工作正常。





After updating this, I was able to add the following code with out any issue. Also the Intellisense for the trigger is working properly.

<sdk:datagrid... >
.....
 <l:interaction.triggers>
   <l:eventtrigger eventname="LoadingRow">
       <ei:callmethodaction methodname="UpdateRowBackGroundColor"/>
   </l:eventtrigger> 
 </l:interaction.triggers>
<sdk:datagrid>
</sdk:datagrid></sdk:datagrid...>





然后,我建了解决方案,它是成功的。当我调试它时,我在一个文件中遇到了另一个新的运行时问题(xxxx.xaml.gics):





Then, I built the solution and it was successful. When I debugged it, I ended up in another new runtime issue in one file (xxxx.xaml.g.i.cs):

{System.Windows.Markup.XamlParseException: The type 'CallMethodAction' was not found because 'clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions' is an unknown namespace. [Line: 1109 Position: 69]
   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)}





请帮帮我!



谢谢,

Sruthi



Please help me!

Thanks,
Sruthi


我也被困在同样的情况。我收到同样的错误。请帮助
I'm also stuck up in same situation. I'm getting same error. Please help


这篇关于Expression.Samples.Interactivity.dll问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆