I'm building a custom control to select color, but when I put a RadColorSelector, the NoTextColor property isn't updated at all.
I've tried either putting directly in the template of my control
or using a general property that is bound to the NoColorText which is either changed directly in the default values of my control or set manually in the UserControl in which I'm using the custom Control
In both cases the text remains "Automatic" while using changing the property when putting the control outside of a custom control template (as in using the RadColorSelector directly in a UserControl) will change the text correctly.
I've tried either putting directly in the template of my control
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"{x:Type local:RColorChooser}"
>
<...>
<
telerik:RadColorSelector
x:Name
=
"colorSelector"
NoColorText
=
"Desired Text"
SelectedColor
=
"{Binding SelectedColor, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
/>
<...>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
or using a general property that is bound to the NoColorText which is either changed directly in the default values of my control or set manually in the UserControl in which I'm using the custom Control
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"{x:Type local:RColorChooser}"
>
<...>
<
telerik:RadColorSelector
x:Name
=
"colorSelector"
NoColorText
=
"{TemplateBinding NoColorText}"
SelectedColor
=
"{Binding SelectedColor, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
/>
<...>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
<
Setter
Property
=
"NoColorText"
Value
=
"Desired Text"
/>
In both cases the text remains "Automatic" while using changing the property when putting the control outside of a custom control template (as in using the RadColorSelector directly in a UserControl) will change the text correctly.