Liquid foams have been observed to behave like immersed granular materials in at least one respect: deformation tends to raise their liquid contents, a phenomenon called dilatancy. While experimental observations evidenced the effect of a continuous deformation rate (dynamic dilatancy), we present a geometrical interpretation of both main contributions to elastic dilatancy (during elastic deformation) in foams squeezed between two solid plates (2D GG foams), which contain pseudo Plateau borders along the plates, and in 3D foams. The positive contribution is related to the increase in total Plateau border length while the negative contribution reflects the increase in total surface area of the foam. In 2D, we show that the negative dilatancy predicted by Weaire and Hutzler (Philos. Mag., 83 (2003) 2747) at very low liquid fractions is specific to ideal 2D foams (with no glass plates). In 3D, we predict that dilatancy should be positive at low liquid fractions (below 1%) and negative at moderate liquid fractions (above 4%).