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

Color Picker Display

2 Answers 84 Views
ColorPicker
This is a migrated thread and some comments may be shown as answers.
gautham
Top achievements
Rank 1
gautham asked on 18 Sep 2009, 09:22 AM
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 Answers, 1 is accepted

Sort by
0
Bobi
Telerik team
answered on 18 Sep 2009, 10:40 AM
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.
0
FieldTRAKS
Top achievements
Rank 1
answered on 30 Sep 2009, 06:37 PM
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>
Tags
ColorPicker
Asked by
gautham
Top achievements
Rank 1
Answers by
Bobi
Telerik team
FieldTRAKS
Top achievements
Rank 1
Share this question
or