I am using the RadTimeSpanPicker to choose a duration, and I'd like to style the Clear and Close buttons to match the Run New Objective button. How can I access the button styles?
Thanks,
Chuck
1 Answer, 1 is accepted
0
Stenly
Telerik team
answered on 14 May 2025, 07:47 AM
Hello Chuck,
To achieve this requirement, extract the default ControlTemplate of the RadTimeSpanPicker control and locate the two RadButton instances with x:Name="PART_Clear" and x:Name="PART_Close". After that, it can be applied via an implicit Style to affect all instances or via an explicit one to affect only specific ones.
An important thing here is that these buttons are retrieved internally, so they should not be removed. Generally, this is the case when elements inside our default ControlTemplates contain the "PART_" prefix.
Optionally, you could extract the default ControlTemplate of the RadButton element and customize it, in order to have more control over the customization to achieve the result from the shared image.
With this being said, I hope the provided information will be of help to you.
Thanks, Stenly. I extracted the RadButton template and put it in the Resources section of my control, but the buttons in the RadTimeSpanPicker didn't change. Here is what I'm using: