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

Multiple Dropdown content in RadDropDownButton

1 Answer 168 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
VS
Top achievements
Rank 1
VS asked on 02 Oct 2012, 03:33 AM
Hi,
Am having some issues with the Dropdown content in RadDropDownButton.
I get multiple instances of the dropdown content (attached screen shot).
Below is my xaml.

<telerik:RadDropDownButton AutoOpenDelay="0:0:0.0" Grid.Column="1" Grid.Row="0" FlowDirection="RightToLeft" DropDownButtonPosition="Left" 
                                                       Visibility="{TemplateBinding SearchHistoryListVisibility}" KeepOpen="False" DropDownMaxHeight="170"
                                                       IsOpen="{Binding IsSearchHistoryOpen, Mode=TwoWay}">
                                    <telerik:RadDropDownButton.DropDownContent>
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="{Binding SearchHistoryWidth}" />
                                            </Grid.ColumnDefinitions>
                                            <ListBox Grid.Column="0" FlowDirection="LeftToRight" 
                                                     ItemContainerStyle="{StaticResource SearchHistoryItemStyle}" BorderThickness="0.25" BorderBrush="DarkGray"
                                                     ItemsSource="{Binding Path=SearchHistoryList}" 
                                                     SelectedValue="{Binding Path=SelectedSearchQuery, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                                                     HorizontalAlignment="Stretch" />
                                        </Grid>
                                    </telerik:RadDropDownButton.DropDownContent>
                                </telerik:RadDropDownButton>

Am trying to close the dropdown content on click of a listbox item. Am setting  IsSearchHistoryOpen=false from SelectedSearchQuery property.

This happens only when I specify Mode=TwoWay in 
IsOpen="{Binding IsSearchHistoryOpen, Mode=TwoWay}".
But if I dont specify the twoway mode, the dropdowncontent doesnt close when i click the listbox item.

Any help is much appreciated.

Thanks

1 Answer, 1 is accepted

Sort by
0
Zarko
Telerik team
answered on 04 Oct 2012, 01:52 PM
Hello Varikkara,
Thank you for the feedback! Unfortunately I wasn't able to reproduce this issue so I'd like to ask you for some more code snippets, the exact version of your dlls and steps to reproduce the bug or a sample project.
I've attached the sample project I used for testing so you could examine it and tell us what we're doing wrong.
We're looking forward to hearing from you.
p.s. From what I see in the png you're using a custom RadDropDownButton style and if that's true could you please test your solution without it ?

Greetings,
Zarko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Buttons
Asked by
VS
Top achievements
Rank 1
Answers by
Zarko
Telerik team
Share this question
or