$XeF_2$,$XeF_4$,and $XeF_6$ are prepared by the direct reaction of xenon with fluorine gas under specific conditions of temperature,pressure,and molar ratios.
$1. XeF_2$ is obtained by reacting $Xe$ (in excess) with $F_2$ at $673 \ K$ and $1 \ bar$ pressure:
$\mathop {Xe_{(g)}}\limits_{(\text{excess})} + F_{2_{(g)}} \xrightarrow{673 \ K, 1 \ bar} XeF_{2_{(s)}}$
$2. XeF_4$ is obtained by reacting $Xe$ and $F_2$ in a $1:5$ molar ratio at $873 \ K$ and $7 \ bar$ pressure:
$\mathop {Xe_{(g)}}\limits_{(1:5 \ \text{ratio})} + 2F_{2_{(g)}} \xrightarrow{873 \ K, 7 \ bar} XeF_{4_{(s)}}$
$3. XeF_6$ is obtained by reacting $Xe$ and $F_2$ in a $1:20$ molar ratio at $573 \ K$ and $60-70 \ bar$ pressure:
$\mathop {Xe_{(g)} + 3F_{2_{(g)}}}\limits_{(1:20 \ \text{ratio})} \xrightarrow{573 \ K, 60-70 \ bar} XeF_{6_{(s)}}$