1. A computer-implemented method for programmatically manipulating a user interface element, the method comprising: requesting from the element whether the element supports a control pattern, the element being of a particular element type, the control pattern describing basic functionality exposed by a plurality of types of elements; and if the element supports the control pattern, manipulating the element using at least one method exposed by the element that corresponds to the control pattern, whereby the element is manipulated based on its support of the control pattern without reference to the element's type.