This is a migrated thread and some comments may be shown as answers.

Problem with focus and disabled state

3 Answers 370 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Patrick asked on 05 Feb 2016, 04:00 PM

Hello,

I'm working with the Office 2013 theme, perhaps the problem is not visible in other theme.

I have a WPF application with a combo box that can be enabled/disabled with a click on a button on the ribbon. Clicking on the button doesn't change the focus (that's important).

I the combo box is enabled and has the focus, pressing the ribbon button disables the combo box, but it stilll shows that it has the focus. When moving the focus to another control, the combo box still shows the focus state.

I think that the focus state should only be displayed when the combo box is enabled.

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 08 Feb 2016, 07:44 AM
Hi Patrick,

I have tried the scenario, but didn't manage to recreate the described issue -  please check the attached video, am I missing something? Can you send us some sample code showing the exact setup you have?

Looking forward to your reply.

Regards,
Yana
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
answered on 08 Feb 2016, 07:51 AM

Hi Yana,
the difference is that your button is taking the focus out of the combo box when clicked.
My button is on the ribbon, so it doesn't take the focus when clicked and the focus is still on the combo box when it is disabled.

0
Yana
Telerik team
answered on 08 Feb 2016, 01:04 PM
Hello Patrick,

I am sorry I missed that.  We were able to reproduce the reported issue, I have logged it in our Feedback Portal and you can track its progress at the following link:
http://feedback.telerik.com/Project/143/Feedback/Details/182266-radcombobox-does-not-update-its-focused-state-when-disabled

In the meantime, as a workaround, you can manually update the focused state of the ComboBox before disabling it with the following code:

if (this.comboBox.IsKeyboardFocusWithin)
{
   VisualStateManager.GoToState(this.comboBox, "Unfocused", false);               
}

I have updated your points as a small sign of gratitude for your involvement.

Regards,
Yana
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ComboBox
Asked by
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Yana
Telerik team
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or