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

"Border" of the last selected item

1 Answer 125 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Licensing
Top achievements
Rank 1
Licensing asked on 23 Jan 2012, 12:36 PM
Hello,
I have a RadToolBar with buttons on it. When I click on a button a "border" appears around it. After focus is moved to another control the border still remains on the button.

Is it possible to remove that "border" after toolbar loses focus?

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 26 Jan 2012, 11:05 AM
Hello,

The border in question is the focus indication of the buttons but as the RadToolBar is a FocusScope, the focus of the controls in the toolbar isn't changed when clicking outside the toolbar. This is why the Button is still marked as focused even when moving the focus to the TextBox.

In order to get over this you can either remove the focused state border from the RadToolBar elements or you can change the RadToolBar IsFocusScope setting:
<telerik:RadToolBar FocusManager.IsFocusScope="False"/>

Setting the attached property FocusManager.IsFocusScope to False will allow you to clear the focus of the RadToolBar elements when clicking outside the bar, but it can cause issues if you use ApplicationCommands.

Basically when using application commands like Cut, Copy, Paste in a control that is in a focus scope, the commands can automatically detect the command target. However, if the RadToolBar isn't a focus scope and you want to define application commands for the bar's button controls, then you'll have to explicitly set the CommandTarget of the commands.

Regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
ToolBar
Asked by
Licensing
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or