public static void Invoke(this Dispatcher dispatcher, Action action) { Delegate actionAsDelegate = action as Delegate; dispatcher.Invoke(actionAsDelegate); }