fixed #377
This commit is contained in:
1 parent
12689384a5
commit
3eb802d4e3
1 file changed
+5
-7
@@ -39,7 +39,7 @@ namespace HandyControl.Tools.Extension
|
||||
=> element.SetValue(TargetPropertyProperty, value);
|
||||
|
||||
private static DependencyProperty GetTargetProperty(DependencyObject element)
|
||||
=> (DependencyProperty) element.GetValue(TargetPropertyProperty);
|
||||
=> (DependencyProperty)element.GetValue(TargetPropertyProperty);
|
||||
|
||||
public BindingMode Mode { get; set; }
|
||||
|
||||
@@ -79,12 +79,11 @@ namespace HandyControl.Tools.Extension
|
||||
_isInternalAction = true;
|
||||
SetLangBinding(element, targetProperty, keyBinding.Path, element.DataContext);
|
||||
_isInternalAction = false;
|
||||
return element.GetValue(targetProperty);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
SetTargetProperty(element, targetProperty);
|
||||
element.DataContextChanged += LangExtension_DataContextChanged;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -95,12 +94,11 @@ namespace HandyControl.Tools.Extension
|
||||
_isInternalAction = true;
|
||||
SetLangBinding(element, targetProperty, keyBinding.Path, element.DataContext);
|
||||
_isInternalAction = false;
|
||||
return element.GetValue(targetProperty);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
SetTargetProperty(element, targetProperty);
|
||||
element.DataContextChanged += LangExtension_DataContextChanged;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user