Controlling the electronic surface properties of a material