protected void InvokeActions(object parameter) { if (this.PreviewInvoke != null) { PreviewInvokeEventArgs previewInvokeEventArg = new PreviewInvokeEventArgs(); this.PreviewInvoke(this, previewInvokeEventArg); if (previewInvokeEventArg.Cancelling) { return; } } foreach (System.Windows.Interactivity.TriggerAction action in this.Actions) { action.CallInvoke(parameter); } }
protected void InvokeActions(object parameter) { if (this.PreviewInvoke != null) { PreviewInvokeEventArgs previewInvokeEventArgs = new PreviewInvokeEventArgs(); this.PreviewInvoke(this, previewInvokeEventArgs); if (previewInvokeEventArgs.Cancelling) { return; } } foreach (TriggerAction action in Actions) { action.CallInvoke(parameter); } }
/// <summary> /// Method used to invoke the associated actions /// </summary> /// <param name="parameter"></param> protected void InvokeActions(object parameter) { if (DesignMode.DesignModeEnabled) { return; } if (PreviewInvoke != null) { var e = new PreviewInvokeEventArgs(); this.PreviewInvoke(this, e); if (e.Cancelling) { return; } } foreach (TriggerAction action in this.Actions) { action.CallInvoke(parameter); } }