This commit is contained in:
NaBian committed 2021-02-02 00:27:59 +08:00
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
{