private void ActiveTracing_KeyUp(CoreWindow sender, KeyEventArgs args) { if (args.VirtualKey == VirtualKey.Escape) { GraphingControl.ActiveTracing = false; ActiveTracing.Focus(FocusState.Programmatic); args.Handled = true; } }
private void GraphingControl_LostFocus(object sender, RoutedEventArgs e) { // If the graph is losing focus while we are in active tracing we need to turn it off so we don't try to eat keys in other controls. if (GraphingControl.ActiveTracing) { if (ActiveTracing.Equals(FocusManager.GetFocusedElement()) && ActiveTracing.IsPressed) { ActiveTracing.PointerCaptureLost += ActiveTracing_PointerCaptureLost; } else { GraphingControl.ActiveTracing = false; OnShowTracePopupChanged(false); } } }