Let $f=u+iv$ be analytic in an open domain $D$.
If $|f|$ is constant in $D$, show, with the maximum principle, that $f$ is constant on $D$.
The proof through Cauchy-Riemann is here.
There it is mentioned that the result can be shown with the maximum principle.
I don't see how the proof goes.
From the maximum principle, I can write $$ k = u^2+v^2 \le \left| f\left( z \right) \right|, $$ for $z$ in the boundary, and $k=|f|$ on $D$.