'WPF: Listbox or menu will not close on click (inside a Telerik Splitbutton)

I have the split button defined as below (in a control template). When the user selects a menu item, I expect the menu to close. I dont know if it's in the SplitButton or Menu that is not closing. It have tried with a ListBox as well, instead of a menu and got the same result.

IsSplitButtonOpen and all the other bound properties are defined in the viewmodel. IsSplitButtonOpen is set to false in the event handler of the command.

<telerik:RadSplitButton Content="New Search"  
                        Height="22"  
                        Visibility="{TemplateBinding AddButtonVisibility}" 
                        AutoOpenDelay="0:0:0.5"
                        IsOpen="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadTabbedWindow}}, Path=DataContext.IsSplitButtonOpen}" 
                        Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadTabbedWindow}}, Path=DataContext.ShowSearchCommand}" 
                        CommandParameter="SearchAccountsView">

                                   

    <telerik:RadSplitButton.DropDownContent>
        <telerik:RadMenu Orientation="Vertical"                                                               
                            ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadTabbedWindow}}, Path=DataContext.NewTabListItems}" >
            <telerik:RadMenu.ItemTemplate>
                <DataTemplate>
                    <telerik:RadMenuItem Header="{Binding Text}"  
                                Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadTabbedWindow}}, Path=DataContext.ShowSearchCommand}" 
                                CommandParameter="{Binding ViewName}" 
                                />
                </DataTemplate>
            </telerik:RadMenu.ItemTemplate>
        </telerik:RadMenu>
    </telerik:RadSplitButton.DropDownContent> 
</telerik:RadSplitButton>


Solution 1:[1]

Please, try to use CloseOnPopupMouseLeftButtonUp property and set it to True. Both RadSplitButton and RadDropDownButton have that property. You can even refuse IsOpen property if it has only one purpose.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ouflak