我有一个像这样的简单列表视图
<ListView Name="CoordinateList" Margin="2"
Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="3">
<ListView.View>
<GridView>
<GridViewColumn DisplayMemberBinding="{Binding Nr}" Header="Nr." Width="40"/>
<GridViewColumn DisplayMemberBinding="{Binding X}" Header="X" Width="100"/>
<GridViewColumn DisplayMemberBinding="{Binding Y}" Header="Y" Width="100"/>
<GridViewColumn DisplayMemberBinding="{Binding Q}" Header="Q" Width="40"/>
</GridView>
</ListView.View>
</ListView>
我可以添加项目、排序或删除它们,例如:
CoordinateList.Items.Add(new Coordinate() { Nr = 1, X = 230, Y = 530, Q = 2 });
但是我现在如何访问或更改数据?这并没有给我以下属性Coordinate
:
CoordinateList.Items[i].