private void ButtonItemClickHandler(object sender, RoutedEventArgs e) { var data = (sender as FrameworkElement).DataContext as DeckInformation; if (data == null) { return; } DeckItemClickEvent?.Invoke(data); }
private void ListViewItemClickHandler(object sender, ItemClickEventArgs e) { var item = e.ClickedItem as DeckInformation; if (item == null) { throw new Exception("Wrong data type"); } if (!IsDragAndDropEnable) { DeckItemClickEvent?.Invoke(item); } }