/// <summary>
 /// The event handler that is listening to the preview invoke event that is fired by
 /// the trigger. Setting PreviewInvokeEventArgs.Cancelling to True will
 /// cancel the invocation.
 /// </summary>
 /// <param name="sender">The trigger base object.</param>
 /// <param name="e">An object of type PreviewInvokeEventArgs where e.Cancelling can be set to True.</param>
 private void OnPreviewInvoke(object sender, PreviewInvokeEventArgs e)
 {
     if (this.Condition != null)
     {
         e.Cancelling = !this.Condition.Evaluate();
     }
 }
 protected void InvokeActions(object parameter)
 {
     if (PreviewInvoke != null)
     {
         var e = new PreviewInvokeEventArgs();
         PreviewInvoke(this, e);
         if (e.Cancelling)
         {
             return;
         }
     }
     foreach (var action in Actions)
     {
         action.CallInvoke(parameter);
     }
 }
 void OnPreviewInvoke(object sender, PreviewInvokeEventArgs e)
 {
     DataBindingHelper.EnsureDataBindingOnActionsUpToDate(this);
 }