public static void PointerPressed(PointerRoutedEventArgs e) { if (ControlInFocus != null) { ControlInFocus.LoseFocus(); ControlInFocus = null; } PointerPoint p = e.GetCurrentPoint(Canvas); foreach (win2d_Control control in Controls) { if (control.HitTest(p.Position)) { // START DEBUG Statics.DebugControlInFocusString = "Focus: " + control.ToString(); // END DEBUG control.MouseDown(p); control.GiveFocus(); ControlInFocus = control; return; } } // no hits // START DEBUG Statics.DebugControlInFocusString = "Focus: N/A"; // END DEBUG }