Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
ComboBox in XamRibbon closes unexpectedly
posted

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!

Parents
No Data
Reply
  • 54937
    Verified Answer
    Offline posted

    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.

Children