如何定位ListView中的Item?
局部的xmal代码:
<ListView x:Name="ListView_SongList" Padding="55,0,10,0"
ItemContainerStyle="{StaticResource RecommendItemContainerStyle}" IsItemClickEnabled="True" ItemClick="ListView_SongList_ItemClick" SelectionChanged="ListView_SelectionChanged">
<ListView.ItemTemplate>
<DataTemplate ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto">
<Grid Width="1000" Height="40">
<Grid Grid.ColumnSpan="4" Background="White" Opacity="0.1"/>
<Grid Height="36" Margin="10,6,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="0.7*"/>
<ColumnDefinition Width="0.6*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<TextBlock x:Name="FileName_TextBlock" Grid.Column="0" Text="{Binding FileName}" Style="{StaticResource ListViewTextStyle}" />
<TextBlock Grid.Column="1" Text="{Binding Artist}" Style="{StaticResource ListViewTextStyle}" />
<TextBlock Grid.Column="2" Text="{Binding Ablum}" Style="{StaticResource ListViewTextStyle}"/>
<StackPanel Grid.Column="3" Orientation="Horizontal">
<Button Style="{StaticResource ListViewImageButtonStyle}">
<Image Source="Images/ListPage/ListAddTo.png" Style="{StaticResource ListViewImageStyle}"/>
</Button>
<Button Style="{StaticResource ListViewImageButtonStyle}">
<Image Source="Images/ListPage/FavoriteList.png" Style="{StaticResource ListViewImageStyle}"/>
</Button>
<Button Style="{StaticResource ListViewImageButtonStyle}" Click="DeleteButton_Click">
<Image Source="Images/ListPage/ListDelete.png" Style="{StaticResource ListViewImageStyle}"/>
</Button>
</StackPanel>
</Grid>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>