Tag Archives: Expression.Interactions

There is no solution to the problem of expression. Interactions in behavior development

Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>

For example, the following example of using behavior needs to refer to: 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>

What if the prompt can’t find DLL

Through visual studio installer, you can find:

After successful installation, you can find: