2013-07-31 31 views
2

我不知道如何使用触发器在XAML的Windows Phone 8windows phone: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找到兼容的软件包。

感谢您的耐心等待。

回答

3

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

集驻留在这里:

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

+0

右键单击References - > Add参考.. - >扩展 - >为Wiin 8.1选择Behaviors SDK(XAML)(通用应用程序) –