protected virtual bool HasFocusWithinCore() { HWND hwndFocus = NativeMethods.GetFocus(); return (hwndFocus != null && !hwndFocus.IsInvalid && NativeMethods.IsChild(Handle, hwndFocus)); }