I have a radSpiltButton with a simple search form in the drop down content. When the user hits enter I want a button on that form to be triggered (isDefault=true), however the enter is closing the drop down content. How can I keep the content open when the user hits enter?
There doesn't seem to be a cancelable DropDownClosing event that I can cancel, so I tried checking for the pressed key in the DropDownClosed event. If the key is the enter key then I try to re-open the drop down. I received an error: "Cannot reopen a popup in the closed event handler."
private void splt_Customer_DropDownClosed(object sender, RoutedEventArgs e)
{
if (Keyboard.IsKeyDown(Key.Return))
{
splt_Customer.IsOpen = true;
// Error: "Cannot reopen a popup in the closed event handler."
}
}
I can't re-open the drop down content once its been closed; so how do I prevent it from closing on enter in the first place?