RadDropDownButton.Content - How to remove border

5 posts, 0 answers
  1. Dustin Clonch
    Dustin Clonch avatar
    4 posts
    Member since:
    Aug 2006

    Posted 22 Dec 2010 Link to this post

    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?
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 24 Dec 2010 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Dustin Clonch
    Dustin Clonch avatar
    4 posts
    Member since:
    Aug 2006

    Posted 27 Dec 2010 Link to this post

    Perfect! Thanks so much for the help!
  5. Josh K
    Josh K avatar
    5 posts
    Member since:
    Apr 2014

    Posted 13 Jan 2015 Link to this post

    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?
  6. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 16 Jan 2015 Link to this post

    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.

     
Back to Top
UI for WPF is Visual Studio 2017 Ready