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

RadDropDownButton.Content - How to remove border

4 Answers 208 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Dustin Clonch
Top achievements
Rank 1
Dustin Clonch asked on 22 Dec 2010, 11:24 PM
I have a radDropDownButton that has a border with a corner radius as the DropDownContent - the border corner radius is applied, however I cannot seem to find where to remove the 1 pixel border that is always around the DropDownContent.  Is this possible?

4 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 24 Dec 2010, 04:03 PM
Hi Dustin Clonch,

In order to modify / remove the desired border you can edit the template of the RadDropDownButton in Expression Blend like it is done in the attached project. The border`s code is commented.
Give it a try and feel free to ask if you need more info.

All the best,
Petar Mladenov
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Dustin Clonch
Top achievements
Rank 1
answered on 27 Dec 2010, 05:41 PM
Perfect! Thanks so much for the help!
0
Josh K
Top achievements
Rank 1
answered on 14 Jan 2015, 02:47 AM
I'd be interested to see an example of this using the current version of the controls without using ButtonChrome, which has been deprecated since Petar's original reply. Does anyone have such an example?
0
Petar Mladenov
Telerik team
answered on 16 Jan 2015, 09:52 AM
Hello Josh,

The solution with Current Telerik Styles is not much different than before. You need to edit the default Style of the RadDropDownButton and edit / remove the border around the ContentControl which holds the DropDownContent. Attached is solution with implicit styles and no-xaml binaries and the change is in line 3244 in Telerik.Windows.Controls.xaml file.
<Popup x:Name="DropDownPopup" AllowsTransparency="True" StaysOpen="False" Focusable="False" Placement="Bottom">
                           <Grid>
                               <!--<Border x:Name="DropDownPopupBorder"
                                       BorderThickness="1"
                                       MinWidth="3"
                                       MinHeight="3"
                                       Width="{TemplateBinding DropDownWidth}"
                                       Height="{TemplateBinding DropDownHeight}"
                                       MaxWidth="{TemplateBinding DropDownMaxWidth}"
                                       MaxHeight="{TemplateBinding DropDownMaxHeight}"
                                       Background="{StaticResource ControlBackground}"
                                       BorderBrush="{StaticResource ControlOuterBorder}">-->
                                   <ContentControl x:Name="DropDownPopupContent"
                                           Content="{TemplateBinding DropDownContent}"
                                           HorizontalContentAlignment="Stretch"
                                           VerticalContentAlignment="Stretch"
                                           ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                                           HorizontalAlignment="Stretch"
                                           VerticalAlignment="Stretch"
                                           DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"
                                           ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                           ContentStringFormat="{TemplateBinding ContentStringFormat}"/>
                               <!--</Border>-->
                           </Grid>


Regards,
Petar Mladenov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Buttons
Asked by
Dustin Clonch
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Dustin Clonch
Top achievements
Rank 1
Josh K
Top achievements
Rank 1
Share this question
or