Handle Unselected
event of the DataGridRow. This is however just an idea, as it wont allow you to Unselect
any row. But you can build upon this further, checking for Ctrl key pressed etc.
void DataGridRow_Unselected(object sender, RoutedEventArgs e)
{
DataGridRow row = sender as DataGridRow;
Task.Factory.StartNew(() =>
{
Application.Current.Dispatcher.Invoke(() => { row.IsSelected = true; });
});
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.