RadColorSelector NoColorText not changed when inside template

2 posts, 1 answers
  1. Julien
    Julien avatar
    24 posts
    Member since:
    Nov 2008

    Posted 30 Aug 2010 Link to this post

    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.
  2. Answer
    Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 02 Sep 2010 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top