Private _LastClick As DateTime = DateTime.MinValue
Private _DoubleClickTime AsDouble = 1500Private _LastDataGridRow As MyModel= NothingPrivateSub DataGrid1_MouseLeftButtonUp(ByVal sender AsObject, ByVal e As System.Windows.Input.MouseButtonEventArgs) Handles DataGrid1.MouseLeftButtonUp
Dim viewModel As MyViewModel = CType(Me.DataContext, MyViewModel )
Dim clickTime As DateTime = DateTime.Now
Dim currentRowClicked As MyModel
If viewModel.CanRetrieveQuote Then
currentRowClicked = CType(CType(sender, DataGrid).SelectedItem, MyModel)
Dim isDoubleClick AsBoolean = (currentRowClicked.Equals(_LastDataGridRow)) And clickTime.Subtract(_LastClick) <= TimeSpan.FromMilliseconds(_DoubleClickTime)
If isDoubleClick Then
viewModel.RetrieveQuote()
EndIf
_LastClick = clickTime
_LastDataGridRow = currentRowClicked
EndIfEndSub