protected override sealed bool HasFocusWithinCore() { if (_hwndSource != null) { return ((IKeyboardInputSink)_hwndSource).HasFocusWithin(); } else { return base.HasFocusWithinCore(); } }