[DevExpress Support Team: CLONED FROM T195028: Shift+Tab stops working when entering a LookUpEdit]
Hi,
I've attached a simple sample demonstrating a few key modifier usability issues with LookUpEdit that I've spent a day trying to resolve unsuccessfully.
Issue 1: Shift+Tab stops working when entering a LookUpEdit
Steps to reproduce: Type something in the Name field. Press Tab. The cursor moves to the next field. Now press Shift+Tab. Instead of going to the previous field, the LookupEdit opens.
Any solution may preferably build on a resource dictionary template approach where appropriate (included), because that's what we are using.
Thanks
Hello,
The cause of this behavior is that SearchLookUpEdit' LookUpEdit.ImmeditePopup property is set to "true", and for now there is no way to change this property to false. I have passed this thread to our R&D team for further research. Once we have any news, we will update this thread. Please stay tuned.
Thanks,
Andrey
After implementing the workaround in other tickets it seems this problem is resolved, and you could perhaps build your solution on that. This is what I have currently:
protected override bool ProcessPopupKeyDown(KeyEventArgs e)
{
// Tab stops navigating in a LookUpEdit: https://www.devexpress.com/Support/Center/Question/Details/T195458
var res = base.ProcessPopupKeyDown(e);
if (e.Key == Key.Tab)
{
ClosePopup();
}
return res;
}
protected override void OnPreviewKeyDown(KeyEventArgs e)
{
if (ShouldInterceptKey(e))
return;
base.OnPreviewKeyDown(e);
}
private static bool ShouldInterceptKey(KeyEventArgs e)
{
// Solution for preventing popup on keyboard commands:
// The Control-key is consumed by the LookupEdit: https://www.devexpress.com/support/center/Question/Details/T195459
return e.Key == Key.LeftCtrl || e.Key == Key.RightCtrl
|| e.Key == Key.LeftShift || e.Key == Key.RightShift;
}
Thank you for sharing this solution with us. We appreciate your cooperation.
Andrey