【发布时间】:2013-10-02 11:53:02
【问题描述】:
我对 windows phone 8 有点陌生,迷失在这个 {Binding} 东西中。我想知道这个按钮如何绑定命令参数?这个命令参数绑定到什么?
<data:MoviesByCategory x:Key="movies"/>
<data:MoreCommand x:Key="moreCommand" />
<phone:LongListSelector x:Name="codeMovies" IsGroupingEnabled="true"
ItemsSource="{StaticResource movies}"
ListHeaderTemplate="{StaticResource movieListHeader}"
GroupHeaderTemplate="{StaticResource movieGroupHeader}"
ItemTemplate="{StaticResource movieItemTemplate}"
JumpListStyle="{StaticResource MoviesJumpListStyle}"
toolkit:TiltEffect.IsTiltEnabled="True">
<!-- The group footer template, for groups in the main list -->
<phone:LongListSelector.GroupFooterTemplate>
<DataTemplate>
<Button DataContext="{Binding}" Content="{Binding GetMore}"
Command="{StaticResource moreCommand}" CommandParameter="{Binding}"/>
</DataTemplate>
</phone:LongListSelector.GroupFooterTemplate>
【问题讨论】:
标签: windows-phone-7 windows-phone-8 windows-phone