Hello everyone,
I have Listview looking like this,
- <ListView.View>
- <GridView>
- <GridView.ColumnHeaderContextMenu>
- <ContextMenu >
- <MenuItem Header="Ascending" Click="MenuItem_Click" />
- <MenuItem Header="Descending" />
- </ContextMenu>
- </GridView.ColumnHeaderContextMenu>
- <GridView.Columns >
- <GridViewColumn Width="155px" DisplayMemberBinding="{Binding FirstName}" Header="User Name" />
- </GridView.Columns>
- </GridView>
- </ListView.View>
What is the code for sorting listview inside MenuItem_Click ?
- private void MenuItem_Click(object sender, RoutedEventArgs e)
- {
-
- }
Here is image,
Regards,
Abhilash.J.A