How to select an item in LongListSelector using the MVVM-pattern?
问题 I'm building application using the MVVM pattern. After clicking on one of the elements I want to see this element's details. I wrote this: XAML <phone:LongListSelector ItemsSource="{Binding Data}" Margin="0,0,0,158" SelectedItem="{Binding SelectedItem}"> <phone:LongListSelector.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <Button> <!-- Command="{Binding ShowDetailsAction}"--> <Button.Template> <ControlTemplate> <TextBlock Text="{Binding Text}"></TextBlock> <