So there's multiple RadComboBox's nested in a ScrollViewer each with OpenDropDownOnFocus=True
The problem is if you hold down tab, then even AFTER each control loses focus, many of them still keep their dropdown part open resulting in a lot of stacked up dropdowns open which is obviously undesired. Is there some lost focus timer or something I'm missing to keep this from happening and to actually ensure every drop down closes as soon as the control loses focus?
Thanks!
5 Answers, 1 is accepted
I kind of expected no re-response. So if anyone else runs into this. All I did was attach to the LostFocus and property change IsDropDownOpen to False to politely remind the control again to close it's damn drop down even if the user is speeding through through focusing.
Cheers!
You can prevent the DropDown to stay open by closing it using Dispatcher:
protected
override
void
OnLostFocus(RoutedEventArgs e)
{
if
(!
this
.IsKeyboardFocusWithin)
{
Dispatcher.BeginInvoke(
new
Action(() =>
{
if
(
this
.IsDropDownOpen)
{
this
.IsDropDownOpen =
false
;
}
}));
}
base
.OnLostFocus(e);
}
More on the described approach you can find in the attached project. So it would be great if you could give it a try and let us know if this works for you.
Looking forward to your reply.
Regards,
Georgi
Telerik
I am glad that you were able to find the most suitable solution to your scenario.
Also If you have any other questions or concerns, please don't hesitate to write us.
Regards,
Georgi
Telerik