Setting ButtonPartStyle in SplitButtonStyle make no effect

2 posts, 0 answers
  1. Sergey
    Sergey avatar
    58 posts
    Member since:
    Jan 2013

    Posted 24 Apr 2014 Link to this post


    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}"/>

  2. Evgenia
    Evgenia avatar
    1437 posts

    Posted 29 Apr 2014 Link to this post

    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.
Back to Top