我有ListView
内部GridView
视图ListView
并ListView
指定了项目来源。我似乎不知道怎么做。我得到SelectedItem
或GridView
改变SelectedItem
。
<ListView Grid.Row="4" Margin="0,250,0,0" ItemsSource="{Binding TestBinding}" SelectedItem="{Binding Path=selectedItem}" IsSynchronizedWithCurrentItem="True" HorizontalAlignment="Left" SelectionChanged="ListView_SelectionChanged">
<ListView.View>
<GridView AllowsColumnReorder="False" >
<GridViewColumn Header="Test" DisplayMemberBinding="{Binding Path=Test1}" Width="100" />
<GridViewColumn Header="Test2" DisplayMemberBinding="{Binding Path=Test2}" Width="130" />
</GridView>
</ListView.View>
</ListView>