Hello!
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
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!
Roxana
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"> |
<Setter.Value> |
<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"> |
<Border.Background> |
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> |
<GradientStop Color="#FF3B2555" /> |
<GradientStop Color="#FF2B1C3C" Offset="0.61699998378753662" /> |
<GradientStop Color="#FF321F47" Offset="1" /> |
</LinearGradientBrush> |
</Border.Background> |
<Path x:Name="Path" Height="Auto" Margin="0,0.082,0,8.859" Width="Auto" |
Stretch="Fill" Stroke="{x:Null}" StrokeLineJoin="Round" |
StrokeThickness="1" |
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"> |
<Path.Fill> |
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> |
<GradientStop Color="#005B3D7A" Offset="0.092" /> |
<GradientStop Color="#FF5B3D7A" Offset="1" /> |
</LinearGradientBrush> |
</Path.Fill> |
</Path> |
</Border> |
<ContentPresenter VerticalAlignment="Center" |
HorizontalAlignment="Center" |
Content="{TemplateBinding Content}" |
ContentTemplate="{TemplateBinding ContentTemplate}"/> |
</Grid> |
<ControlTemplate.Triggers> |
<Trigger Property="IsMouseOver" Value="true"> |
<Setter Property="BorderBrush" TargetName="Background" Value="#FFFFFFFF" /> |
<Setter Property="Fill" TargetName="Path"> |
<Setter.Value> |
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> |
<GradientStop Color="#005B3D7A" Offset="0.092" /> |
<GradientStop Color="#FF6D4497" Offset="1" /> |
</LinearGradientBrush> |
</Setter.Value> |
</Setter> |
</Trigger> |
<Trigger Property="IsPressed" Value="True" /> |
<Trigger Property="IsEnabled" Value="False" /> |
<Trigger Property="IsFocused" Value="False" /> |
</ControlTemplate.Triggers> |
</ControlTemplate> |
</Setter.Value> |
</Setter> |
</Style> |
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!
Roxana