To implement password strength form I have used the simplest algorithm. To make appropriate calculations and to change the the color of the night progress bar and the internal text the form is using ViewModel .

It also determines the validity of the form and enables/disables the submit button. I had to override the template of the ProgressBar to change the background color.