Selecting WPF ListView row in code
An app I am considering migrating to WPF uses a DevExpress grid to show a list of events, as I animate my composition I highlight the current event in the grid. Things I have learned about WPF: 01: You can create a data grid type view like so: <ListView Name="ListView"> <ListView.View> <GridView AllowsColumnReorder="False"> <GridViewColumn DisplayMemberBinding="{Binding Path=Title}" Header="Title"/> <GridViewColumn DisplayMemberBinding="{Binding Path=FirstName}" Header="FirstName"/> <GridViewColumn DisplayMemberBinding="{Binding Path=LastName}" Header="LastName"/> </GridView> </ListView.View> </ListView> 02: Don’t put a ListView in a <StackPanel>! It renders all of the data at once. When you have 6K rows of data for example it takes about 1 second to select the next row. Instead you should put it in a grid <Gri