RadDropDownButton styling

3 posts, 1 answers
  1. RoxanaC
    RoxanaC avatar
    71 posts
    Member since:
    Dec 2009

    Posted 13 Jan 2010 Link to this post

    I need a DropDownButton that looks the very similar with the Themes button from RadControls fo WPF demos
    If use the same style from a regular button I somehow lose the drop down functionality

    <!-- Style for Button --> 
                <Style TargetType="Controls:RadDropDownButton" x:Key="DefaultButtonStyle"
                    <Setter Property="Background" Value="Transparent" /> 
                    <Setter Property="Foreground" Value="#FFFFFFFF" /> 
                    <Setter Property="Padding" Value="3" /> 
                    <Setter Property="BorderThickness" Value="1" /> 
                    <Setter Property="VerticalContentAlignment" Value="Center" /> 
                    <Setter Property="HorizontalContentAlignment" Value="Center" /> 
                    <Setter Property="BorderBrush" Value="Transparent" /> 
                    <Setter Property="Cursor" Value="Hand" /> 
                    <Setter Property="Template"
                            <ControlTemplate TargetType="Controls:RadDropDownButton"
                                <Grid Margin="0 0 0 5"
                                    <Border x:Name="Background" BorderBrush="#FFBF97F2" 
                                    BorderThickness="1,1,1,1" CornerRadius="4,4,4,4"
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"
                                                <GradientStop Color="#FF3B2555" /> 
                                                <GradientStop Color="#FF2B1C3C" Offset="0.61699998378753662" /> 
                                                <GradientStop Color="#FF321F47" Offset="1" /> 
                                        <Path x:Name="Path" Height="Auto" Margin="0,0.082,0,8.859" Width="Auto" 
                                        Stretch="Fill" Stroke="{x:Null}" StrokeLineJoin="Round" 
                                        Data="M0,3 C0,1.3431457 1.3431457,0 3,0 L129,0 C130.65686,0 132,1.3431457 132,3 L132,13.853975 C86.718803,0.055481441 26.160202,27.400364 0,11.585506 z"
                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"
                                                    <GradientStop Color="#005B3D7A" Offset="0.092" /> 
                                                    <GradientStop Color="#FF5B3D7A" Offset="1" /> 
                                    <ContentPresenter VerticalAlignment="Center" 
                                                Content="{TemplateBinding Content}" 
                                                ContentTemplate="{TemplateBinding ContentTemplate}"/> 
                                    <Trigger Property="IsMouseOver" Value="true"
                                        <Setter Property="BorderBrush" TargetName="Background" Value="#FFFFFFFF" /> 
                                        <Setter Property="Fill" TargetName="Path"
                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"
                                                    <GradientStop Color="#005B3D7A" Offset="0.092" /> 
                                                    <GradientStop Color="#FF6D4497" Offset="1" /> 
                                    <Trigger Property="IsPressed" Value="True" /> 
                                    <Trigger Property="IsEnabled" Value="False" /> 
                                    <Trigger Property="IsFocused" Value="False" /> 

    I might use instead a RadComboBox but I don't know exactly how to style it in the same maner ( the idea is that I don't want to use instead just a RadComboBox with QsfTheme because I need to change some colors & stuff and I don't have the code from QsfTheme )
    Can you help me?

    Thank you!

  2. Answer
    Dimitrina avatar
    442 posts

    Posted 14 Jan 2010 Link to this post

    Hi Roxana Cocariu,

    You can apply  a custom theme to any of  the controls. For more information you can follow the link below:


    Please find attached an example. If you have further questions please do not hesitate to ask us.

    I hope this will help you.

    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. RoxanaC
    RoxanaC avatar
    71 posts
    Member since:
    Dec 2009

    Posted 15 Jan 2010 Link to this post

    Hey Dimitrina,
    Unfortunately the Expression blend tutorials are no help for me since I don't have this tool.
    But thank you for the example! This worked great for me.

Back to Top