private void GridViewItem_Tapped_1(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e) { IPilot pilot = ((FrameworkElement)e.OriginalSource).DataContext as IPilot; if (pilot == null) { return; } this.Visibility = Visibility.Collapsed; //PilotSelector.Visibility = Visibility.Collapsed; //ShipSelector.Visibility = Visibility.Visible; //PilotSelector.ItemsSource = null; PilotSelected?.Invoke(pilot); }
private void PilotControl_Tapped(object sender, TappedRoutedEventArgs e) { var pilot = ((IPilotViewModel)(((UserControl)sender).DataContext)); PilotSelected?.Invoke(pilot); }