private void DcrEvent_OnMouseRightButtonUp(object sender, MouseButtonEventArgs e) { if (_traceRecording) { var activity = sender?.GetType().GetProperty("DataContext")?.GetValue(sender, null) as string; //if (_currentlyRecordingTrace.ActivitySequence.Contains(activity) || // _currentlyRecordingTrace.Context.ContextActivities.Contains(activity)) // return; _currentlyRecordingTrace.AddToContext(activity); } }