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

Setting ButtonPartStyle in SplitButtonStyle make no effect

1 Answer 197 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Sergey asked on 24 Apr 2014, 12:38 PM

ColorButtonStyle is obsolete property. So I want to use SplitButtonStyle to customize ButtonPart.
When I apply SplitButtonStyle  to RadColorPicker it make no difference, but it is ok when I apply this style to SplitButton itself.
Control's version is 2014.1.224.40


<Style TargetType="Button" x:Key="ColorButtonStyle">
     <Setter Property="Template">
             <ControlTemplate TargetType="Button">
                 <Grid Height="25" Background="Transparent">
                         <RowDefinition Height="0.664*" />
                         <RowDefinition Height="0.336*" />
                     <TextBlock Text="Y" HorizontalAlignment="Center" Foreground="Red" />
                     <Rectangle Width="16" Margin="-2 0 0 0" Fill="{TemplateBinding Background}" Height="4.232"
                             Grid.Row="1" VerticalAlignment="Top" />
     <Setter Property="Background" Value="Black" />
 <Style TargetType="telerik:RadSplitButton" x:Key="SplitButtonStyle">
    <Setter Property="ButtonPartStyle" Value="{StaticResource ColorButtonStyle}" />

The way I use them:

<telerik:RadColorPicker SplitButtonStyle="{StaticResource SplitButtonStyle}"/>
<telerik:RadSplitButton Style="{StaticResource SplitButtonStyle}"/>

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 29 Apr 2014, 09:09 AM
Hi Segey,

Unfortunately you hit a bug in RadColorPicker. From what I tested locally it seems that SplitButtonStyle property doesn't get applied and thus you can't modify the SplitButton this way. Our developers were notified and this will be fixed as soon as possible (for one of our upcomming internal builds released every Monday). An option would be to strip down the whole ColorPicker default template from our themes and modify whatever needed there. There is an article explaining this.

We apologize for the inconvenience. You may find your Telerik points updated as a sign of gratitude for pointing this out.

Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question