This is a migrated thread and some comments may be shown as answers.
How to set select/focus borderline in the RadDropDownList
1 Answer 9 Views
This is a migrated thread and some comments may be shown as answers.
Tamil
Top achievements
Rank 1
Tamil asked on 14 Oct 2020, 01:53 PM

Hello team,

How to set select/focus borderline in the RadDropDownList?

for example,
 if I press the tab button to focus on the RadButton that I can know the button is focused, but there is no focus borderline in the RadDropDownList. I have attached the image.

Kindly, check and share the fix details for set the focus borderline in RadDropDownList. 

Notes: I'm using C# code.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Nadya
Telerik team
answered on 14 Oct 2020, 03:04 PM

Hello, Tamil,

Note that the look of RadControls is defined through the themes and it may differ from the look of the standard MS controls. Different themes offer different style settings. According to the attached picture with RadDropDownList, it seems that you are using the ControlDefault theme. However, it is important to know which is the specific theme that you use in order to apply proper styling. If you are using any custom theme it would be greatly appreciated if you can specify it.

It is possible to change the style for a specific element state without losing the applied style for the rest of the states by overriding theme settings at run time. For example, when using the ControlDefault theme you can override the "ContainsFocus" state of the drop-down list and change the ForeColor property of the BorderPrimitive as demonstrated below:

this.radDropDownList1.DropDownListElement.SetThemeValueOverride(BorderPrimitive.ForeColorProperty, Color.Orange, "ContainsFocus", typeof(BorderPrimitive));

More information is available here: https://docs.telerik.com/devtools/winforms/telerik-presentation-framework/override-theme-settings-at-run-time 

Another possible approach is to modify the theme directly with the Visual Style Builder tool and achieve the desired look.

I hope this helps. Should you have other questions please let me know.

Regards,
Nadya
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Asked by
Tamil
Top achievements
Rank 1
Answers by
Nadya
Telerik team
Share this question
or