private void SelectMethodsCallableNext_OnClick(object sender, RoutedEventArgs e) { Method selectedMethod = ((FrameworkElement)sender).DataContext as Method; _projectEditorViewModel.SelectMethodsCallableNextFor(selectedMethod); }