The solution processability of colloidal perovskite nanocrystals (PNCs) provides versatility in the device fabrication process. However, the low solvent resistance of PNCs impedes their use in all-solution processes for optoelectronic applications. Herein, we demonstrate a facile strategy for improving the solvent resistance of PNC films and for forming desired PNC patterns by benefitting from the ligand polymerization. We show that unsaturated bonds in ligands can be activated by i-line ultraviolet exposure in the presence of photoinitiators, which induces a chain reaction of ligands, and consequently enable to crosslink individual PNC. The location of unsaturated bonds in the olefin-terminated ligands affected the PNC-crosslinking efficiency. We also demonstrate the direct photopatterning of PNC films by manipulating the selectivity of the ligand polymerization. The improved solvent resistance of the PNC films allows the fabrication of all-solution-processed PNC light-emitting diodes. We utilized ZnO in colloidal form, which can be easily deposited via spin-coating as an electron transport layer. The results indicate that ligand polymerization is an effective strategy for fabricating all-solution-processed PNC-based optoelectronics.