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

Dropdown button in Silverlight

1 Answer 94 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Hector
Top achievements
Rank 1
Hector asked on 07 Oct 2009, 01:59 PM
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> 

1 Answer, 1 is accepted

Sort by
0
Accepted
Valentin.Stoychev
Telerik team
answered on 07 Oct 2009, 02:07 PM
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.
Tags
General Discussions
Asked by
Hector
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
Share this question
or