private void Image_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Space || e.Key == Key.Enter) { ScreenCoordinatesRoutedEventArgs args = new ScreenCoordinatesRoutedEventArgs(ViewWidgetTrackDisplay.OpenTrackDialogClickEvent, this, new System.Windows.Point(0, 0)); RaiseEvent(args); } }
public void OpenTrackDialog_Click(object sender, ScreenCoordinatesRoutedEventArgs args) { WindowChrome window = this.FindVisualAncestor <WindowChrome>(); if ((bool)window.GetValue(WindowChrome.IsMiniModeActiveProperty) == false) { ShowFullScreenArtwork = true; } }
private void Image_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { ScreenCoordinatesRoutedEventArgs args = new ScreenCoordinatesRoutedEventArgs(ViewWidgetTrackDisplay.OpenTrackDialogClickEvent, this, new System.Windows.Point( this.PointToScreen(e.GetPosition(this)).X, this.PointToScreen(e.GetPosition(this)).Y)); RaiseEvent(args); e.Handled = true; }