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

RadColorSelector NoColorText not changed when inside template

1 Answer 87 Views
ColorPicker
This is a migrated thread and some comments may be shown as answers.
Julien
Top achievements
Rank 1
Julien asked on 30 Aug 2010, 04:50 PM
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

<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.

1 Answer, 1 is accepted

Sort by
0
Accepted
Tina Stancheva
Telerik team
answered on 02 Sep 2010, 01:39 PM
Hi Julien,

Thank you for reporting this issue. I logged it as a bug in our PITS where you will be able to track it from tomorrow the latest under the name ColorPicker: When the RadColorSelector is in a ControlTemplate, the NoColorText property isn't applied.

Please accept our apology for the caused inconvenience.

I also updated your Telerik points accordingly.

All the best,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ColorPicker
Asked by
Julien
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or