mirror of https://github.com/AMT-Cheif/Stylet.git
EventAction defaults to Enable if the ActionTarget is null
This commit is contained in:
parent
bac1d37e8a
commit
a716ac84f9
|
@ -64,7 +64,7 @@ namespace Stylet
|
||||||
var propertyAsEventInfo = valueService.TargetProperty as EventInfo;
|
var propertyAsEventInfo = valueService.TargetProperty as EventInfo;
|
||||||
if (propertyAsEventInfo != null)
|
if (propertyAsEventInfo != null)
|
||||||
{
|
{
|
||||||
var ec = new EventAction((DependencyObject)valueService.TargetObject, propertyAsEventInfo, this.Method, this.NullTarget.GetValueOrDefault(ActionUnavailableBehaviour.Throw), this.ActionNotFound.GetValueOrDefault(ActionUnavailableBehaviour.Throw));
|
var ec = new EventAction((DependencyObject)valueService.TargetObject, propertyAsEventInfo, this.Method, this.NullTarget.GetValueOrDefault(ActionUnavailableBehaviour.Enable), this.ActionNotFound.GetValueOrDefault(ActionUnavailableBehaviour.Throw));
|
||||||
return ec.GetDelegate();
|
return ec.GetDelegate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue