Required for genome-wide de novo methylation and is essential for development. DNA methylation is coordinated with methylation of histones. It modifies DNA in a non-processive manner and also methylates non-CpG sites. Acts as a transcriptional corepressor for ZNF238. Can actively repress transcription through the recruitment of HDAC activity. Also has weak auto-methylation activity on some Cys residue in absence of DNA. a 2'-deoxycytidine in DNA + S-adenosyl-L-methionine = a 5-methyl-2'-deoxycytidine in DNA + H(+) + S-adenosyl-L-homocysteine L-cysteinyl-[protein] + S-adenosyl-L-methionine = H(+) + S-adenosyl-L-homocysteine + S-methyl-L-cysteinyl-[protein] Accumulates in the major satellite repeats at pericentric heterochromatin. The PWWP domain is essential for targeting to pericentric heterochromatin. Belongs to the class I-like SAM-binding methyltransferase superfamily. C5-methyltransferase family.