AgF2 is a layered material and a correlated charge transfer insulator with an electronic structure very similar to the parent compounds of cuprate high-Tc superconductors. It is also interesting for being a powerful oxidizer. Here we present a first principles computation of its electronic properties in a slab geometry including its work function for the (010) surface (7.76 eV) which appears to be one of the highest among known materials surpassing even that of fluorinated diamond (7.24 eV). We demonstrate that AgF2 will show a broken-gap type alignment becoming electron doped and promoting injection of holes in many wide band gap insulators if chemical reaction can be avoided. Novel junction devices involving p type and n type superconductors are proposed. The issue of chemical reaction is discussed in connection with the possibility to create flat AgF2 monolayers achieving high-Tc superconductivity. As a first step in this direction, we study the stability and properties of an isolated AgF2 monolayer.