Color Picker Display

3 posts, 0 answers
  1. gautham
    gautham avatar
    31 posts
    Member since:
    Dec 2008

    Posted 18 Sep 2009 Link to this post

    The color picker image shown in the First Look, suits if one needs to change text color(A). In my case i just need to show the selected color (the A gives a wrong message to the user). Is there a way to to just show the selected color in the display ?
  2. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 18 Sep 2009 Link to this post

    Hello gautham,

    Please take a look at the 4-th ColorPicker in the  FirstLook example:

    http://demos.telerik.com/silverlight/#ColorPicker/FirstLook

    All you need to do is only to set some style to ColorButtonStyle: ColorButtonStyle="{StaticResource ColorButtonStyle}". In the above example you can see one option for custom ColorButtonStyle.

    Another option is to edit the control template in Blend. For more information please visit the following article:
    http://www.telerik.com/help/silverlight/radcontrols-for-silverlight-expression-blend-support.html

    I hope that this will help you. Please let us know if you have any other questions or you need some more help.

    Regards,
    Boryana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
  4. FieldTRAKS
    FieldTRAKS avatar
    25 posts
    Member since:
    Apr 2009

    Posted 30 Sep 2009 Link to this post

    if you want just a rectangle  with the selected color put this in your resources section

      <Style x:Key="ColorButtonStyle" TargetType="Button">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Button">
                            <Grid Height="25" Width="23">

                                <Border x:Name="BackgroundGradient" BorderThickness="1"
                                            Background="Transparent" >
                                    <Grid Height="25" Width="23">
                               
                                       
                                        <Rectangle Width="13" Fill="{TemplateBinding Background}"
                                                    Height="13"  VerticalAlignment="Center" />
                                    </Grid>
                                </Border>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="Background" Value="Black" />
            </Style>
Back to Top