Solved. For some reason Visual studio created an MaskInputRejected event for maskedtextbox by default instead of Text Changed.