0

I have a user control that contains a scroll viewer. inside the scroll viewer I placed another user control with grid, and inside the grid there is a combo box.

all this is placed inside a RadWindow.

Something like this:

first user control: (displayed inside a RadWindow)

<UserControl x:class = "MyFirstUserControl">
 <Grid>
   <ScrollViewer>
     <StackPanel x:Name="stackPanel"/>
   </ScrollViewer>
  </Grid>
</UserControl>

second user control:

<UserControl x:class = "MySecondUserControl">
 <Grid>
  <telerik:RadComboBox x:Name = "comboBox"/>
 </Grid>
</UserControl>

in code behind I add the second user control to the stackPanel:

stackPanel.Children.Add(new MySecondUserControl());

Now, the problem is: when the combo-box drop down is open, and I scroll up / down the control - I expect it to close, but- it remains open...

I try to catch the MouseLeftButtonUp event of the scroll bar, and set the IsDropDownOpen of the comboBox to false, but it is false nonetheless and the drop-down still open.

How can I force the drop-down to close when focus is not on it, even if the focus is out of the combo control altogether?

Thanks,

4

0 回答 0