Jos*_*nel 1 c# silverlight windows-phone-7
我正在研究我的第一个WP7应用程序,这个问题让我有点头疼.
我有一个像这样定义的ListBox
<ListBox Grid.Row="1" ItemsSource="{Binding MyItemList}" SelectedItem="{Binding MySelectedItem}">
<ListBox.ItemTemplate>
<DataTemplate >
<StackPanel>
<TextBlock Text="{Binding Name}" FontSize="35" />
<TextBlock Text="{Binding Details}" FontSize="15"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
Run Code Online (Sandbox Code Playgroud)
绑定ItemsSource工作正常,但选择项目时MySelectedItem-Property不会更新.这个功能没有实现(比如在WPF中)或我只是在做什么?:-)
| 归档时间: |
|
| 查看次数: |
6134 次 |
| 最近记录: |