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

Override CornerRadius with StaticResource value

2 Answers 420 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
gerardo
Top achievements
Rank 1
Veteran
gerardo asked on 20 Jul 2020, 01:17 PM

I am trying to change a CornerRadius value with StaticResource but there is an error showing.

My goal is to override CornerRadius of my controls. For instance, a RadComboBox. I already have the Style RadComboBoxStyle which have the following Setter value.

<Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik:FluentResource ResourceKey=CornerRadius}"/>

 

When I input numeric value (5, 10) as Value, I works well. But I want to have a StaticResource that holds the numeric value so I created a System:Double resource that holds the cornerradius value but when I put it as Value in the Style Setter, an error is showing. 

 

My code 

<Setter Property="mat:MaterialAssist.CornerRadius" Value="{StaticResource GenericInputCornerRadius}"/>

Error

''5' is not a valid value for property 'CornerRadius'.'

2 Answers, 1 is accepted

Sort by
0
gerardo
Top achievements
Rank 1
Veteran
answered on 22 Jul 2020, 05:13 AM

I got it by using CornerRadius instead of System:Double

It is working now.

0
Dinko | Tech Support Engineer
Telerik team
answered on 23 Jul 2020, 06:07 AM

Hi gerardo,

I am happy to hear that you have found a solution to your scenario and thank you for sharing it. If you have any other questions, you can open new thread with your inquiries inside.

Regards,
Dinko
Progress Telerik

Tags
General Discussions
Asked by
gerardo
Top achievements
Rank 1
Veteran
Answers by
gerardo
Top achievements
Rank 1
Veteran
Dinko | Tech Support Engineer
Telerik team
Share this question
or