private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) { switch (msg) { case Native.WM_DESTROY: if (IsAttached) { handled = true; Detach(); TargetLostDetached?.Invoke(this, new EventArgs()); } break; } return(IntPtr.Zero); }
private void AttachCore_TargetLostDetached(object sender, EventArgs e) { TargetLostDetached?.Invoke(sender, e); }