I place the following statements in the second row of my grid in the xaml:
<ScrollViewer VerticalScrollBarVisibility="Auto" Grid.Row="1">
<ListView Name="listView" Margin="5" Grid.Row="1">
<ListView.View>
<GridView AllowsColumnReorder="True">
<GridViewColumn DisplayMemberBinding="{Binding Path=DateTime}" Header="Date Time" Width="140"/>
<GridViewColumn DisplayMemberBinding="{Binding Path=Vehicle}" Header="Vehicle" Width="130"/>
<GridViewColumn DisplayMemberBinding="{Binding Path=AlarmType}" Header="Alarm Type" Width="100"/>
<GridViewColumn DisplayMemberBinding="{Binding Path=Direction}" Header="Direction" Width="100"/>
<GridViewColumn DisplayMemberBinding="{Binding Path=Speed}" Header="Speed" Width="100"/>
<GridViewColumn DisplayMemberBinding="{Binding Path=Alarmed}" Header="Alarmed" Width="100"/>
<GridViewColumn DisplayMemberBinding="{Binding Path=LoadType}" Header="Load Type" Width="100"/>
<GridViewColumn DisplayMemberBinding="{Binding Path=Status}" Header="Status" Width="110"/>
</GridView>
</ListView.View>
</ListView>
</ScrollViewer>
</Grid>
I binded the listView.ItemSource to an ObservableCollection defined in the code to populate data to the list. When the number of items added to the GridView exceeded the listview height, the vertical scroll bar did not appear as i specified in the XAML. What did I do wrong? Your input is greatly appreciated. Thank you.