Hello,
I am trying to binding the colors of a GaugeBarIndicator, but it doesn't work. The error is: "Cannot assign property "Color": Property does not exist, or is not assignable, or mismatching type between value and property"
Code XAML file:
<
telerikGauges:RadRadialGauge
x:Name
=
"gauge"
AxisRadiusFactor
=
"1"
StartAngle
=
"90"
SweepAngle
=
"360"
>
<
telerikGauges:RadRadialGauge.Axis
>
<
telerikGauges:GaugeLinearAxis
Minimum
=
"0"
Maximum
=
"1"
StrokeThickness
=
"0"
ShowLabels
=
"False"
/>
</
telerikGauges:RadRadialGauge.Axis
>
<
telerikGauges:RadRadialGauge.Indicators
>
<
telerikGauges:GaugeBarIndicator
Value
=
"1"
StartThickness
=
"10"
EndThickness
=
"10"
Fill
=
"#ebebeb"
/>
<
telerikGauges:GaugeBarIndicator
Value
=
"0.5"
StartCap
=
"Oval"
StartThickness
=
"10"
EndThickness
=
"10"
EndCap
=
"Oval"
IsOffsetRelative
=
"True"
>
<
telerikGauges:GaugeBarIndicator.GradientStops
>
<
telerikCommon:RadGradientStop
Offset
=
"0"
Color
=
"{Binding StartColor}"
/>
<
telerikCommon:RadGradientStop
Offset
=
"1"
Color
=
"{Binding EndColor}"
/>
</
telerikGauges:GaugeBarIndicator.GradientStops
>
</
telerikGauges:GaugeBarIndicator
>
</
telerikGauges:RadRadialGauge.Indicators
>
</
telerikGauges:RadRadialGauge
>
The property in C# file:
private
Color startColor;
public
Color StartColor
{
get
{
return
startColor; }
set
{
startColor = value;
OnNotifyPropertyChanged(
"StartColor"
);
}
}
Do you know how can I make it work?
Thank you.