fixed #456
This commit is contained in:
1 parent
52a1470640
commit
c2c6dbe490
5 files changed
+40
-29
No files matched your search
@@ -74,7 +74,20 @@ namespace HandyControl.Controls
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty IsDropDownOpenProperty = DependencyProperty.Register(
|
||||
"IsDropDownOpen", typeof(bool), typeof(CheckComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||
"IsDropDownOpen", typeof(bool), typeof(CheckComboBox), new PropertyMetadata(ValueBoxes.FalseBox, OnIsDropDownOpenChanged));
|
||||
|
||||
private static void OnIsDropDownOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var ctl = (CheckComboBox) d;
|
||||
|
||||
if (!(bool) e.NewValue)
|
||||
{
|
||||
ctl.Dispatcher.BeginInvoke(new Action(() =>
|
||||
{
|
||||
Mouse.Capture(null);
|
||||
}), DispatcherPriority.Send);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsDropDownOpen
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user