Windows Phone:在XAML中没有触发? [英] windows phone : no trigger in xaml?

查看:57
本文介绍了Windows Phone:在XAML中没有触发?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道如何在Windows Phone 8的xaml中使用触发器。

I don't know how to use triggers in xaml of windows phone 8.

但是我看到有人这样做,如下所示:

But I have seen some people do it, like below:

<toolkit:ListPicker Header="Background"
                                ExpansionMode="FullscreenOnly"
                                Template="{StaticResource ListPickerControlTemplate}"
                                VerticalAlignment="Top"
                                ItemsSource="{Binding Path=Buildings.ObjectList}"
                                Margin="0"
                                x:Name="buldings"
                                Padding="0">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="SelectionChanged">
                        <i:InvokeCommandAction  Command="{Binding Path=BuildingSelectionCommand}"
                                                CommandParameter="{Binding Path=SelectedItem, ElementName=buldings}" />
                    </i:EventTrigger>
                </i:Interaction.Triggers>

但是我没有System.Windows.Interactivity。
而且我无法通过Nuget找到兼容的软件包。

But I don't have System.Windows.Interactivity. And I failed to find a compatible package through Nuget.

感谢您的耐心等候。

推荐答案


右键单击引用->添加引用。->扩展->选择
System.Windows.Interactivity

Right click on References -> Add Reference.. -> Extensions -> Select System.Windows.Interactivity

程序集位于此处:


C:\Program Files(x86 )\Microsoft SDK \Expression\Blend\Windows
Phone\v8.0\Libraries\

C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\Windows Phone\v8.0\Libraries\

这篇关于Windows Phone:在XAML中没有触发?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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