how to create a passwordbox?

I use a way to solve it which may seem silly. Use 2 text box, one for store passwords, other for display ***. Emm, It’s too silly.