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

GroupBox has a double line border when it is used as a content for RadExapander?

1 Answer 1301 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Adnan asked on 07 Aug 2016, 08:52 AM

GroupBox border has a double line border whenever it is used as a Content for RadExpander element (Please see the attached file). I want it to be only one line border.

Below is the RadExpander style and the XAML used for both RadExpander and GroupBox:

<Style TargetType="telerik:RadExpander" BasedOn="{StaticResource RadExpanderStyle}">
        <Setter Property="Background" Value="#FF3D3D3D" />
        <Setter Property="BorderBrush" Value="#FF575859" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Margin" Value="5" />
        <Setter Property="Padding" Value="5" />
        <Setter Property="IsExpanded" Value="True" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="ExpandDirection" Value="Down" />

<telerik:RadExpander  Grid.Row="4" >
                    <GroupBox BorderThickness="1" Margin="0,0,5,5" BorderBrush="Black">
                            <TextBlock x:Name="ProfileName"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="*"/>
                            <telerik:RadButton  x:Name="btnLoad" Grid.Column="1" Width="90" Height="25" />
                            <telerik:RadButton  x:Name="btnSave" Grid.Column="0" Width="90"  Height="25" />

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 08 Aug 2016, 08:45 AM
Hello Adnan,

I was able to reproduce the double white border unwanted visual appearance you mentioned. However this doesn't relate to RadExpander. If you create a GroupBox outside RadExpander's Content and add dark background to the container that holds the GroupBox control you'll observe the same visual appearance.

 So what can you do to get rid of it -- remove the BorderThickness setting of your GroupBox as the white Borders are TemplateBound to it in the ControlTemplate. Still if you want to see the Black Border and remove the White Borders around the GroupBox you'll have to retemplate the default ControlTemplate.
Even though GroupBox is a MS control, you might still check our help article to see how to edit the control template of GroupBox via Expression Blend or VisualStudio Designer. 

Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question