/// <summary> /// Returns the active input elements at a point on an <see cref="IInputElement"/>. /// </summary> /// <param name="element">The element to test.</param> /// <param name="p">The point on <paramref name="element"/>.</param> /// <returns> /// The active input elements found at the point, ordered topmost first. /// </returns> public static IEnumerable <IInputElement> GetInputElementsAt(this IInputElement element, Point p) { Contract.Requires <ArgumentNullException>(element != null); return(element.GetVisualsAt(p, s_hitTestDelegate).Cast <IInputElement>()); }
public static IEnumerable <IInputElement> GetInputElementsAt(this IInputElement element, Point p) { element = element ?? throw new ArgumentNullException(nameof(element)); return(element.GetVisualsAt(p, s_hitTestDelegate).Cast <IInputElement>()); }