Behavior开发时找不到Expression.Interactions的问题解决

Posted lixiaobin

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Behavior开发时找不到Expression.Interactions的问题解决相关的知识,希望对你有一定的参考价值。

比如下面使用Behavior的例子,需要参照:Microsoft.Expression.Interactions.dll。

<Window x:Class="VisualStudioBehavior.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 
        xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
        Name="Window"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Button Content="Hello world">
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="Click">
                    <ei:CallMethodAction TargetObject="{Binding ElementName=Window}" MethodName="Alert" />
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </Button>
    </Grid>
</Window>

如果提示找不到Dll怎么办?

通过Visual studio installer可以找到:

技术分享图片

安装成功之后就可以找到了:

技术分享图片

 

以上是关于Behavior开发时找不到Expression.Interactions的问题解决的主要内容,如果未能解决你的问题,请参考以下文章

在暂停订阅时找不到资源

ASP.NET Core - 环境为 Stage 时找不到嵌入式资源(Microsoft 标识)。它在开发时工作正常

尝试部署服务器时找不到 database.properties

npm:在 Electron 应用程序中执行命令时找不到命令

运行应用程序时找不到类错误

在 VS 2017 中设置新项目时找不到 Azure Functions