This project is read-only.

WM_NCHITTEST

Jul 24, 2010 at 4:48 PM

Thanks for this nice component.

When I was testing it, I noticed a bug in RibonWindow.cs, in method WndProc, under case NativeMethods.WM_NCHITTEST. I expanded/collapsed the menu with the expander on the right side. And then the bug appeared (the inputElement was a Run if I recall correctly).

Please change:

IInputElement inputElement = mainGrid.InputHitTest(mousePosWindow);                               
 if (inputElement != null)

into:

 IInputElement inputElement = mainGrid.InputHitTest(mousePosWindow); 
if ((inputElement != null) && (inputElement is FrameworkElement))

or something that tests the class of the imputElement.

 

Thanks,

Frank