From a716ac84f93b0de1c2ec0ceeb9928dcbbe2559fc Mon Sep 17 00:00:00 2001 From: Antony Male Date: Thu, 24 Apr 2014 12:46:58 +0100 Subject: [PATCH] EventAction defaults to Enable if the ActionTarget is null --- Stylet/Xaml/ActionExtension.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Stylet/Xaml/ActionExtension.cs b/Stylet/Xaml/ActionExtension.cs index 87bfdd6..69c0468 100644 --- a/Stylet/Xaml/ActionExtension.cs +++ b/Stylet/Xaml/ActionExtension.cs @@ -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(); }