xaml - Windows 手机 : no trigger in xaml?

标签 xaml triggers windows-phone-8

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

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

<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找到兼容的包。

感谢您的耐心等待。

最佳答案

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

程序集位于此处:

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

关于xaml - Windows 手机 : no trigger in xaml?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17962346/

相关文章:

python - sqlalchemy 中关于另一个应用程序创建的新行的通知

windows-phone-8 - ObservableCollection无法正常工作RaisePropertyChangeEvent

windows-phone-8 - 使用照片捕获设备捕获照片时方向错误

c# - 在 Windows Phone 应用程序的 Pivot 和 Panorama 之间混合

c# - 为什么我在 WPF 用户控件上看到 "member is not recognized or is not accessible"错误?

c# - 在 Windows Phone 上拉动刷新

android - Android中触发器和事件有什么区别

c# - 如何正确绑定(bind)数据网格和文本框并仅在单击按钮后更新数据网格?

c# - 为什么我的模板的文本框无法绑定(bind)

jquery-ui - 单击按钮时触发 jQueryUI datePicker,将结果发送到禁用的输入字段