private IntPtr WinProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, ref Boolean handled)
        {
            IntPtr result = IntPtr.Zero;

            switch (msg)
            {
            case WM_ENTERSIZEMOVE:
                OnResizeEventHandler?.Invoke(this, true);
                break;

            case WM_EXITSIZEMOVE:
                OnResizeEventHandler?.Invoke(this, false);
                break;

            case WM_SYSCOMMAND:
                if ((int)wParam == SC_MAXIMIZE || (int)wParam == SC_MINIMIZE ||
                    (int)wParam == SC_RESTORE || (int)wParam == SC_STORE)
                {
                    OnResizeEventHandler?.Invoke(this, true);
                }
                break;
            }
            return(result);
        }
 private void CanResizableVisionWindowWpf_StateChanged(object sender, EventArgs e)
 {
     OnResizeEventHandler?.Invoke(this, false);
 }