The reason the focus is not set to the RadComboBox
properly is because when the Focus
method is invoked, the control has not yet been fully loaded.
You will need to use a Dispatcher
for this to work. Here's an interesting thread
discussing a similar issue.
Therefore, you can define the OnIsFocusedChanged
method like so:
OnIsFocusedChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
RadComboBox comboBox = dependencyObject
newValue = (
oldValue = (
(newValue && !oldValue && !comboBox.IsFocused)
Do let me know if this works for you.
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin
, a suite of polished and feature-rich components for the Xamarin framework, which allow
you to write beautiful native mobile apps using a single shared C# codebase.