I used to have a XF Ghia (until those low life scum sucking pigs stole it). With a similar problem, only the gauge would read full all the time. It turned out the sensors are easily upset by moisture.
2 things to check for. 1 is it the right sensor, I think the eletrioncic dash used a different sensor. 2. Try putting 2 litres of Metho (don't drink it) into your fuel tank, it absorbs any mositure.