/// <summary> /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed. /// <example> /// routedeventhandler.BeginInvoke(sender, e, callback); /// </example> /// </summary> public static IAsyncResult BeginInvoke(this RoutedEventHandler routedeventhandler, Object sender, RoutedEventArgs e, AsyncCallback callback) { if (routedeventhandler == null) { throw new ArgumentNullException("routedeventhandler"); } return(routedeventhandler.BeginInvoke(sender, e, callback, null)); }