<UserControl x:Class="DropDownButtonIssue.MainPage" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
xmlns:tk="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" |
xmlns:telInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input" |
mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"> |
<Canvas x:Name="LayoutRoot" Height="200" Width="300" Background="AliceBlue"> |
<tk:RadDropDownButton x:Name="btnTest" Width="75" Height="22" |
DropDownIndicatorVisibility="Collapsed" |
DropDownHeight="100" DropDownWidth="175" Content="Click Me" |
> |
<tk:RadDropDownButton.DropDownContent> |
<Canvas x:Name="cvContent"> |
<telInput:RadComboBox x:Name="cbDays" Width="100" SelectedIndex="0" > |
<telInput:RadComboBoxItem Content="Last 7 Days"/> |
<telInput:RadComboBoxItem Content="Last 30 Days"/> |
<telInput:RadComboBoxItem Content="All"/> |
</telInput:RadComboBox> |
</Canvas> |
</tk:RadDropDownButton.DropDownContent> |
</tk:RadDropDownButton> |
</Canvas> |
</UserControl> |
9 Answers, 1 is accepted
Thank you for contacting us.
In order to disable the auto-close on selection-changed behavior please set the button's KeepOpen property to True:
<tk:RadDropDownButton
x:Name="btnTest"
KeepOpen="True"
...
Please give it a try and let us know if you have other questions.
Best wishes,
Ivan
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.
I am having the same issue as in this ticket. How can I achieve the 'KeepOpen' functionality with the RadDropDownButton?
Thanks,
Lee
Currently there is no such property. I added this issue in our public issue tracking system under the name "RadDropDownButton: Add KeepOpen property" and it will be available for tracking and voting tomorrow the latest.
On a side note, I'd like to inform you that we've just released an online tool that allows you to reduce the size of your Silverlight applications. For more information, please visit http://blogs.telerik.com/blogs/posts/10-06-10/telerik_assembly_minifier.aspx
Best wishes,
Viktor Tsvetkov
the Telerik team
Talking to you in two threads for this, one support and one here. My apologies for that. Below is what I mentioned in my other reply, just to make sure you get it. Again, I really appreciate the help and timely feedback.
My RadDropDownButton is hosted in a RadRibbonDropDownButton which is hosted in the RadRibbonBar.
When it is only the RadDropDownButton containing the RadColorPicker, the RadDropDownButton correctly stays open after a color has been chosen.
When it is a RadRibbonDropDownButton containing a RadDropDownButton as its drop down content, and the RadDropDownButton contains the RadColorPicker, the issue appears. The RadDropDownButton closes immediately after a color is selected, but combo boxes selections work fine and the RadDropDownButton stays open.
I was able to recreate the behavior that I just described in a very basic test application. Creating a new application and putting the xaml that I pasted below in the MainPage.xaml will recreate the issue for you.
Thanks again for your help!
--------------------------------------------------------------------------------------------------------------------------------
<UserControl x:Class="TestRadDropDownButton.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
xmlns:telerikRibbonBar="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.RibbonBar"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<Border Margin="5,5,5,5" BorderBrush="Black" BorderThickness="1,1,1,1" CornerRadius="5,5,5,5" Padding="5,5,5,5">
<Grid x:Name="contentGrid">
<telerikRibbonBar:RadRibbonBar x:Name="MainToolbar"
Title="Test Color Picker">
<telerikRibbonBar:RadRibbonTab x:Name="ColorPickerTab"
Header="Color Picker" >
<telerikRibbonBar:RadRibbonGroup Header="Color Picking"
Visibility="Visible" >
<telerikRibbonBar:RadButtonGroup>
<telerikRibbonBar:RadRibbonDropDownButton x:Name="chartAppearanceDropDownButton"
Size="Large"
LargeImage="/Resources/close.png"
Text="Appearance" >
<telerikRibbonBar:RadRibbonDropDownButton.DropDownContent >
<telerik:RadDropDownButton x:Name="appearanceDropDownButton"
Height="30"
Width="80"
Margin="3,0,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center" >
<telerik:RadDropDownButton.DropDownContent>
<Grid x:Name="colorPickerLayoutRoot">
<Border Margin="5,5,5,5" BorderBrush="Black" BorderThickness="1,1,1,1" CornerRadius="5,5,5,5" Padding="5,5,5,5" Background="LightBlue">
<Grid x:Name="colorPickerContentGrid">
<Grid.RowDefinitions>
<RowDefinition Height="20" />
<RowDefinition Height="20" />
<RowDefinition Height="35" />
<RowDefinition Height="20" />
<RowDefinition Height="20" />
<RowDefinition Height="35" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="1" Text="Select Color: " HorizontalAlignment="Center"/>
<telerikInput:RadColorPicker x:Name="foregroundColorPicker"
Grid.Row="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="2" />
<TextBlock Grid.Row="4"
Text="Test Combo:"
HorizontalAlignment="Center"
VerticalAlignment="Bottom"/>
<ComboBox x:Name="testComboBox"
Grid.Row="5"
Margin="5"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<ComboBox.Items>
<ComboBoxItem Content="Value1" />
<ComboBoxItem Content="Value2" />
<ComboBoxItem Content="Value3" />
<ComboBoxItem Content="Value4" />
<ComboBoxItem Content="Value5" />
</ComboBox.Items>
</ComboBox>
</Grid>
</Border>
</Grid>
</telerik:RadDropDownButton.DropDownContent>
</telerik:RadDropDownButton>
</telerikRibbonBar:RadRibbonDropDownButton.DropDownContent>
</telerikRibbonBar:RadRibbonDropDownButton>
</telerikRibbonBar:RadButtonGroup>
</telerikRibbonBar:RadRibbonGroup>
</telerikRibbonBar:RadRibbonTab>
</telerikRibbonBar:RadRibbonBar>
</Grid>
</Border>
</Grid>
</UserControl>
Thanks!
I posted a reply to your support thread. Give it a try and let me know if the workaround helps.
Best wishes,
Kiril Stanoev
the Telerik team
My issue is reverse of above post. Like when I select item from RadDropDownButton, it doesn't close automatically on selection. Even if I seelct item, dropdown remains open (expanded), until I clcik somewhere else on screen.
Please suggest me, how can I collapse this dropdown, once item is selected.
We replied to your question in this forum post.
Regards,Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>