I have a custom control for use in the ribbon that incorporates a System.Windows.Controls.ComboBox. Everything works well unless the user clicks on the up or down arrows for the ScrollViewer in the dropdown of the ComboBox; this causes the ComboBox to close immediately as if the user had made a selection.
Users clicking on the up/down arrows of the ScrollViewer in the same control outside of the ribbon does not cause the ComboBox to close.
Can anyone help explain why this is happening and how to fix it?
Thanks!
If focus is shifted out of the ribbon then combo could close up. Since the ribbon is a focus scope that can happen because button elements will try to call Keyboard.Focus(null) at certain points (e.g. when it loses mouse capture and it has keyboard focus and is not in the main focus scope). If you can post a sample that demonstrates the problem we can look into this further.
It appears that a colleague re-templated the ScollBar for the application and neglected to mark the track and buttons as Focusable = false.
Once that was done, everything is working just fine.
Thank you!