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

RadDropDownButton and RadComboBox

9 Answers 360 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Randall Nelson
Top achievements
Rank 1
Randall Nelson asked on 10 Dec 2009, 11:03 PM
I have a RadDropDownButton and in the content of the drop down I have a RadComboBox. The problem is when the user selects an option from the combo box, the RadDropDownButton closes up.  Is there a way to prevent this?  Sample code below:

<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

Sort by
0
Accepted
Ivan
Telerik team
answered on 11 Dec 2009, 12:29 PM
Hi Randall,
 

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.
0
Randall Nelson
Top achievements
Rank 1
answered on 11 Dec 2009, 03:57 PM
Had to get the latest build, but this works perfectly.  Thanks.
0
Lee
Top achievements
Rank 1
answered on 29 Jul 2010, 09:02 PM
I am on Silverlight version 2010.1.603.1040.....and the RadDropDownButton appears to no longer have this 'KeepOpen' property.

I am having the same issue as in this ticket. How can I achieve the 'KeepOpen' functionality with the RadDropDownButton?


Thanks,

Lee
0
Viktor Tsvetkov
Telerik team
answered on 30 Jul 2010, 03:37 PM
Hi 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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Lee
Top achievements
Rank 1
answered on 30 Jul 2010, 08:27 PM
Hey Viktor,

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>

0
Lee
Top achievements
Rank 1
answered on 03 Aug 2010, 04:16 PM
Any progress on this yet Viktor? Were you able to recreate the issue using the xaml I posted?

Thanks!
0
Kiril Stanoev
Telerik team
answered on 03 Aug 2010, 04:45 PM
Hello Lee,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Shweta
Top achievements
Rank 1
answered on 02 Dec 2011, 11:17 AM
Hi Ivan,
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.
0
Petar Mladenov
Telerik team
answered on 06 Dec 2011, 03:59 PM
Hi Shweta,

 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 >>

Tags
Buttons
Asked by
Randall Nelson
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Randall Nelson
Top achievements
Rank 1
Lee
Top achievements
Rank 1
Viktor Tsvetkov
Telerik team
Kiril Stanoev
Telerik team
Shweta
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or