And you'd want to do the whole thing at very low temperatures, because at room temperature there would already be too much thermal energy in your detector to see the very small change in energy from the X-ray. That is what an X-ray calorimeter does. It uses a silicon thermistor which has an electrical resistance which changes dramatically with small changes in temperature. It has a low heat capacity. Zero on the Kelvin scale is an absolute zero and represents the cessation of all thermal vibrations.
Calorimeters are able to get the best spectral resolution of any non-dispersive spectrometer.
In proportional counters and CCDs, the energy of the X-ray photon is shared among many electrons. Each of these electrons end up carrying a typical amount of energy, 3.65 eV in the case of the silicon-based CCDs. These electrons are then collected and counted by the electronics, and it's the number of the detected electrons that indicates the energy of the X-ray photon in a CCD detector system. This is a fundamental limit of X-ray detectors that use conversion to electric charges. Show me a printable version of this page.