首页 新闻 会员 周边 捐助

CallMethodAction不能找到,无法识别的命名空间,怎么解决?

0
[待解决问题]

为什么我用CallMethodAction时报异常?
[code=csharp]
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity
    xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
    xmlns:prism="http://www.codeplex.com/prism"

<Button

Content="登 入" Margin="0,0,0,0" Padding="10,5">
                                        <i:Interaction.Triggers>
                                            <i:EventTrigger EventName="Click">
                                               <ei:CallMethodAction TargetObject="{Binding}" MethodName="UserLogin"/>
                                            </i:EventTrigger>
                                        </i:Interaction.Triggers>
                                    </Button>
[/code]

运行时异常:
An unhandled exception("Unhandled Error in SilverLight The type "CallMethodAction" was found because xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" is unknown namespace.

Mark-Liu的主页 Mark-Liu | 初学一级 | 园豆:195
提问于:2011-08-02 10:45
< >
分享
所有回答(1)
0

使用CallMethodAction这个属性的类库是silverlight项目之外的类库吗,如果是的话,再在silverlight项目(非web部分)中引用xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
    xmlns:ie="http://schemas.microsoft.com/expression/2010/interactions"这两个命名空间

Holinz | 园豆:205 (菜鸟二级) | 2011-08-06 16:20
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册