Reversible photoswitching of dye-doped core-shell nanoparticles.