Dropdown button in Silverlight

2 posts, 1 answers
  1. Hector
    Hector avatar
    92 posts
    Member since:
    May 2009

    Posted 07 Oct 2009 Link to this post

    Is there a way to create a button with a drop down menu?  I was able to create one using a regular button with a RadMenu inside of it.  However, I don't like how it looks because the button takes on the shading/color of the RadMenu.
    Example of what I need, minus the shading of the pulldown button
    Here is the code that I have now:
    <Button Margin="2" d:LayoutOverrides="Width, HorizontalMargin" VerticalAlignment="Top" ToolTipService.ToolTip="Export reprot">  
                        <Border Width="40" BorderThickness="2" BorderBrush="White" Height="50" > 
                            <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">  
                                <telerikNavigation:RadMenu VerticalAlignment="Top" ClickToOpen="False" 
                                ItemClick="OnRadMenuItemClick"  x:Name="ReportToolBar" IsEnabled="False">  
                                    <telerikNavigation:RadMenuItem  FontWeight="Bold" FontSize="9.333">  
                                        <telerikNavigation:RadMenuItem.Icon> 
                                            <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">  
                                                <Image Source="images/print_ico.png" Height="19" Width="25" /> 
                                                <TextBlock Text="Export" FontWeight="Bold" FontSize="9.333" /> 
                                            </StackPanel> 
                                        </telerikNavigation:RadMenuItem.Icon> 
                                        <telerikNavigation:RadMenuItem Header="Export as PDF" x:Name="ExportPDF">  
                                            <telerikNavigation:RadMenuItem.Icon> 
                                                <Image Source="../Images/pdf_ico.png" /> 
                                            </telerikNavigation:RadMenuItem.Icon> 
                                        </telerikNavigation:RadMenuItem> 
     
                                        <telerikNavigation:RadMenuItem Header="Excel Formated" x:Name="ExportExcel">  
                                            <telerikNavigation:RadMenuItem.Icon> 
                                                <Image Source="../Images/excel_ico.png" /> 
                                            </telerikNavigation:RadMenuItem.Icon> 
                                        </telerikNavigation:RadMenuItem> 
                                        <telerikNavigation:RadMenuItem Header="Excel Data Only" x:Name="ExportExcelData">  
                                            <telerikNavigation:RadMenuItem.Icon> 
                                                <Image Source="../Images/excel_ico.png" /> 
                                            </telerikNavigation:RadMenuItem.Icon> 
                                        </telerikNavigation:RadMenuItem> 
                                        <telerikNavigation:RadMenuItem Header="MS Word" x:Name="ExportWord" > 
                                            <telerikNavigation:RadMenuItem.Icon> 
                                                <Image Source="../Images/word_ico.png" /> 
                                            </telerikNavigation:RadMenuItem.Icon> 
                                        </telerikNavigation:RadMenuItem> 
                                        <telerikNavigation:RadMenuItem Header="RTF" x:Name="ExportRTF">  
                                            <telerikNavigation:RadMenuItem.Icon> 
                                                <Image Source="../Images/rtf_ico.png" /> 
                                            </telerikNavigation:RadMenuItem.Icon> 
                                        </telerikNavigation:RadMenuItem> 
     
                                    </telerikNavigation:RadMenuItem> 
     
                                </telerikNavigation:RadMenu> 
                            </StackPanel> 
                        </Border> 
                    </Button> 
  2. Answer
    Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 07 Oct 2009 Link to this post

    Hi Hector,

    We have such control in our Q3 beta release. You can see a demo of it here:
    http://demos.telerik.com/silverlight/beta/#Buttons/DropDownButton

    You can download the beta version from your account.

    Best wishes,
    Valentin.Stoychev
    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.
Back to Top