Hi,
I am having a problem where I am using a dropdownbutton with some custom controls inside the dropdowncontent area.
Whenever I click an item, the dropdowncontent stays open. I have tried setting "IsOpen" to false but it is having no effect.
Here is my code, xaml
<telerik:RadDropDownButton x:Name="_toolsDDB" AutoOpenDelay="0:0:0.0" DropDownButtonPosition="Right" Grid.Row="1"
IsBackgroundVisible="False" PopupAnimation="Fade" KeepOpen="False"
DropDownIndicatorVisibility="Collapsed" IsOpen="{Binding ToolsIsOpen, Mode=TwoWay}"
telerik:RadToolTipService.Placement="Top" Margin="5" DropDownPlacement="Right"
telerik:RadToolTipService.ToolTipContent="{Binding GlobalStrings.ToolsStr}">
Viewmodel
public void FunctionClickedCommandHandler(object obj)
{
if (_selectedFunction != null)
{
_selectedFunction.Command.Execute(null);
MouseButtonEventArgs args = obj as MouseButtonEventArgs;
if (obj != null)
{
RadListBox lb = args.Source as RadListBox;
if (lb != null)
lb.SelectedIndex = -1;
}
ToolsIsOpen = false;
}
}
I tried binding to "IsOpen" because for some items clicked I need the dropdown to stay open for others I need it to close as soon as an item is clicked. Right now, I'm just trying to get it to close with the code above.
Here is a quick video showing whats happening
Thanks for any help.