EventAction defaults to Enable if the ActionTarget is null

This commit is contained in:
Antony Male 2014-04-24 12:46:58 +01:00
parent bac1d37e8a
commit a716ac84f9
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ namespace Stylet
var propertyAsEventInfo = valueService.TargetProperty as EventInfo;
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();
}